cleaniquecoders / themer
Laravel Theme
Installs: 1 199
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 2
Open Issues: 0
Requires
- illuminate/filesystem: ^5.6|^5.7
- illuminate/http: ^5.6|^5.7
- illuminate/support: ^5.6|^5.7
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: 3.6.*|3.7.*
- phpunit/phpunit: ^6.5|^7.0
README
Laravel Theme Maker
A simple Laravel Theme Maker, enabled developers to create theme skeleton. Developers just need to add the middleware of themer after creating themes.
Installation
Run the following command to install the package:
composer require cleaniquecoders/themer
Register
Themer Service Provider
Register Themer service provider at config/app.php
in providers
key:
CleaniqueCoders\Themer\ThemerServiceProvider::class,
Themer Middleware
Register Themer middleware at the app/Http/Kernel.php
in $routeMiddleware
:
'theme' => \CleaniqueCoders\Themer\Http\Middleware\ThemeLoader::class,
Usage
Create a new theme skeleton
php artisan make:theme your-theme-name
Assign theme via middleware
Route::get('home','HomeController@index')->middleware('theme:public');
OR
Route::group(['middleware' => ['theme:admin']], function(){ Auth:routes(); });
License
This package is open-sourced software licensed under the MIT license.