Add new Theme

Themes Struct Folder:

└── themes
│   ├── theme_name/
│   │   └── controllers - .php file
│   │   └── public - css,js,image file
│   │   └── resources - .blade file
│   │   └── theme.json - config theme info (name, description, version, auth...)
│   │   └── autoload.php - spl_autoload_register
│   │   └── functions.php - helper function of this theme
│   │   └── routes.php - routes of this theme

routes.php

Here are the basic routes of a website for news articles.
You can customize the Controller, the path... of the existing routes, or add new routes depending on your needs.
Note: Do not rename these routes as they may already be called in other source code files

<?php
use Illuminate\Support\Facades\Route;

Route::middleware('web')->group(function () {
    Route::get('/', [ \controllers\HomePage::class, 'index' ])->name("front.home");
    Route::get('/category/{slug}', [ \controllers\CategoryPage::class, 'list' ])->name("front.post.list");
    Route::get('/tag/{slug}', [ \controllers\CategoryPage::class, 'list' ])->name("front.tag");
    Route::get('/auth/{account}', [ \controllers\AuthPage::class, 'list' ])->name("front.auth");
    Route::get('/search', [ \controllers\SearchPage::class, 'index' ])->name("front.search");
    Route::get('/page/{slug}.html', [ \controllers\DetailPage::class, 'detail_page' ])->name("front.page.detail")->where('slug', '[0-9A-Za-z\-]+');
    Route::get('/{slug}.html', [ \controllers\DetailPage::class, 'detail_post' ])->name("front.post.detail")->where('slug', '[0-9A-Za-z\-]+');;
});
Đang thực hiện vui lòng đợi...
© LaraziCms.
Developed by Codezi.pro