# Upgrade from 5.0 to 5.1
IMPORTANT
Laratrust 5.1 requires Laravel >= 5.2.32 and php >= 5.6.0.
In order to upgrade from Laratrust 5.0 to 5.1 you have to follow these steps:
- Change your
composer.jsonto require the 5.1 version of Laratrust:
"santigarcor/laratrust": "5.1.*"
Run
composer updateto update the source code.Run
php artisan config:clearandphp artisan cache:clear.Update your
config/laratrust.php:4.1. Backup your
config/laratrust.phpconfiguration values.4.2. Delete the
config/laratrust.phpfile.4.3. Run
php artisan vendor:publish --tag=laratrust.4.4. Update the
config/laratrust.phpfile with your old values.Delete the
LaratrustSeeder.phpfile and runphp artisan laratrust:seeder.If you use the method
cachedRolesorcachedPermissionsyou should stop using them and change the parts where you use them because they were deleted from theLaratrustUserTraitandLaratrustRoleTrait.Run
composer dump-autoload.
Now you can use the 5.1 version without any problem.