PHP code example of skotner / laravel-theme

1. Go to this page and download the library: Download skotner/laravel-theme library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

skotner / laravel-theme example snippets


Route::get('home', 'HomeController@home')->middleware('theme:your-theme');

Route::group(['middleware' => 'theme:admin-theme'], function() {
	// "admin-theme" will be applied to all routes defined here
});

return [

	/*
	* Folder where you will store your themes
	*/
	'folder' => resource_path('views/themes'),

];
bash
php artisan vendor:publish --provider="Skotner\Theme\ThemeServiceProvider"