dev-master
9999999-devThe Simple Themes.
MIT
The Requires
- php >=5.5.9
- laravel/framework 5.2.*
by Abdul Hafidz A
laravel cms theme
Wallogit.com
2017 © Pedro Peláez
The Simple Themes.
This is a package for the Laravel 5 Framework that adds basic support for managing themes. It allows you to seperate your views & your assets files in seperate folders, and supports for theme extending! Awesome :), (*1)
Features:, (*2)
install with, (*3)
composer require "xtwoend/laravel-themes"
Add the service provider in app/config/app.php, Providers array:, (*4)
...
Xtwoend\Themes\Providers\ThemesServiceProvider::class,
also edit the Facades array and add:, (*5)
...
'Theme' => Xtwoend\Themes\Facades\Themes::class,
Almost Done. You can optionally publish a configuration file to your application with, (*6)
php artisan vendor:publish --provider="Xtwoend\Themes\Providers\ThemesServiceProvider", (*7)
That's it. You are now ready to start theming your applications!, (*8)
Working with Themes, (*9)
The default theme can be configured in the themes.php configuration file. Working with themes is very straightforward. Use:, (*10)
Theme:set('themename')
or with middleware, (*11)
add middleware theme set in App\Htpp\Kernel.php, (*12)
protected $routeMiddleware = [
...
'theme' => \Xtwoend\Themes\Middleware\SetCurrentTheme::class,
]
set middleware in your route, (*13)
Route::group(['middleware' => 'theme:themename'], function(){
// any route
});
The Simple Themes.
MIT
laravel cms theme