Update your Composer.json
To update to the latest version inside of your composer.json file make sure to update the version of voyager inside the require declaration inside of your composer.json to:
And then run composer update
Run the necessary migrations
You will now need to run the following migrations to include new tables or rows that have been added to the latest version. you can find each of these migrations below:
(possibly need this migration, if already exists do not include) https://github.com/the-control-group/voyager/blob/v0.11.14/publishable/database/migrations/2017_04_21_000000_add_order_to_data_rows_table.php
You can do this by adding each of those migrations to your database/migrations
folder and then run php artisan migrate
Upgrading Settings
Only applicable if you are using settings in your application. New to version 1.0, settings are grouped by section. For instance the following setting will not work:
Each setting key will now belong to a group. Which means that you would need to change the setting to:
{{ setting('site.title') }}
And that title key would now need to have a group with the name of 'Site', like the following:
To update all the settings in your app, you may want to, just create a group name, such as Site, and then update all your settings to include the site
prefix:
Any previous Admin settings have been added to a group called 'Admin'.
Final Steps
Next, you may want to be sure that you have all the latest published assets. To re-publish the voyager assets you can run the following command:
Then you may wish to clear your view cache by running the following command:
At last, must change your User
model to extend TCG\Voyager\Models\User
And now you'll be upgraded to the latest version.
If you're planning to use hooks If you want to use Hooks (Voyager's built-in plugin system) you must run php artisan hook:setup
before it will work. This is now included in php artisan voyager:install
, so this will only need to be run after upgrading from an earlier version.
Troubleshooting
Be sure to ask us on our slack channel if you are experiencing any issues and we will try and assist. Thanks.
To update to the latest version inside of your composer.json file make sure to update the version of voyager inside the require declaration inside of your composer.json to:
And then run
Next, you may want to be sure that you have all the latest published assets. To re-publish the voyager assets you can run the following command:
Lastly, you may wish to clear your view cache by running the following command: