# Upgrade from 7.x to 8.x
Laratrust 8.x requires Laravel 10.x
In order to upgrade from Laratrust 7.x to 8.x you have to follow these steps:
- Change your
composer.jsonto require the 8.x version of Laratrust:
composer updateto update the source code.
php artisan config:clearand
php artisan cache:clear.
4.1. Backup your
4.2. Delete the
php artisan vendor:publish --tag=laratrust.
4.4. Update the
config/laratrust.phpfile with your old values.
The ownership feature has been completely removed. Then migrate that code.
isAnhave been removed, replace with
The user model now must implement the
Laratrust\Contracts\LaratrustUserinterface and use the
Teammodels should inherit now from the following classes:
- The methods signatures have been changed. Follow this table to migrate them.
- The methods signatures for the events have been changed. Follow this table to migrate them.
Now you can use the 8.x version without any problem.