# Upgrade from 5.2 to 6.X
IMPORTANT
Laratrust 6.x requires Laravel >= 6.x and php >= 7.2.
In order to upgrade from Laratrust 5.2 to 6.x you have to follow these steps:
- Change your
composer.jsonto require the 6.x version of Laratrust:
"santigarcor/laratrust": "^6.0"
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.Run
composer dump-autoload.If you use the
canmethod you MUST change it toisAbleTo. We removed the can method in order to support Laravel policies and gates out of the box.(Optional) If you want to use the administration panel provided in the 6.x version, please read here
Now you can use the 6.x version without any problem.