PHP code example of roland / laravel-theme-manager
1. Go to this page and download the library: Download roland/laravel-theme-manager 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/ */
roland / laravel-theme-manager example snippets
" "roland/laravel-theme-manager": "~1.0"
}
// Service Provider
Roland\Theme\ThemeServiceProvider::class,
// Facade
'Theme' => Roland\Theme\Facades\Theme::class,
// Return default theme's info
return Theme::info();
// Return provided theme's info
return Theme::info('mytheme');
// with() method
return Theme::with(['name' => 'Victoria'])->view(['welcome']);
// Alternative way
return Theme::view(['welcome'], ['name' => 'Victoria']);
Theme::extend('riak', function($app)
{
return 'Riak theme driver';
});
// Chnage the theme driver from route
return Theme::driver('riak');