-
Notifications
You must be signed in to change notification settings - Fork 107
Migrating from v1.x
Sebastien edited this page May 11, 2021
·
11 revisions
Some Breaking Changes have been introduced in version 2.0. If you have installed v1.x then please follow the following steps to upgrade to current version:
- Edit your
composer.jsonfile and change package version to:"igaster/laravel-theme": "^2.0" - Update your package but do not run post-update scripts (because artisan will fail):
composer update igaster/laravel-theme --no-scripts
- Change package declarations at
config/app.php(See step #2# below) - Now you may execulte
php artisan optimizefrom the command line to complete installation
Package namespace has been changed from igaster\laravelTheme to Igaster\LaravelTheme. On a typical setup there are three locations that should be updated:
- Update
providersarray inconfig\app.php. Change decleration fromigaster\laravelTheme\themeServiceProvider::classtoIgaster\LaravelTheme\themeServiceProvider::class - Update
Facadesarray inconfig\app.php. Change decleration from'Theme'=>igaster\laravelTheme\Facades\Theme::class,to'Theme'=>Igaster\LaravelTheme\Facades\Theme::class, - If you are using setTheme middleware then you have to update the declaration at
routeMiddlewarearray in fileapp\Http\Kernel.php. Change to'setTheme'=>\Igaster\LaravelTheme\Middleware\setTheme::class,
-
Theme::config('key','default')has been renamed toTheme:getSetting('key', 'default') -
Theme::configSet('key','value')has been renamed toTheme:setSetting('key', 'value')
Debug mode has been deprecated. You can remove the debug setting from config/themes.php file