Upgrading
5.x to 6.x (16 Feb 2022)
Upgrade to Nexus 7.
4.x to 5.x (9 Dec 2020)
-
Uncomment
Illuminate\Session\Middleware\AuthenticateSessionand addAlberon\NexusUsers\Http\Middleware\EnsureUserIsEnabledtoApp\Http\Kernel(see the template). -
Remove
Authenticable,Authorizable,CanResetPassword,MustVerifyEmailandNotifiable, and their relevant contracts, fromApp\NexusUsers\Models\User(they are now in the parent class). -
Either remove
$castsfromApp\NexusUsers\Models\User(it is now defined in the parent class) or update it to include'enabled' => 'bool'if it has been customised. -
Either remove the
definition()method fromDatabase\Factories\UserFactory(it is now defined in the parent class) or update it to includefirst_name,last_name,enabledandnotes, and removename. -
Optionally delete
2014_10_12_000000_create_users.phpand2014_10_12_100000_create_password_resets_table.phpfromdatabase/migrations/(they are now included in the package) - unless they have been customised. -
Update
Database\Seeders\RoleSeederwith the new permissions (see the template). -
Add
->active()toDatabase\Seeders\UserSeederto ensure the default user is able to log in. -
Recommended: Rename the "Administrator" role to "Developer". (Create a separate "Administrator" role if needed.)
-
Grant all of the new permissions to the Developer role, and grant permissions as needed to other roles and users, including on the live site (manually or through a migration).
-
In
routes/web.php(Nexus-related routes, not frontend), change'auth'to'nexus.auth','verified'to'nexus.verified'and'password.confirm'to'nexus.sudo'. (Note: You no longer have to remove these if they are disabled in the config file - they are bypassed automatically.)
Make sure you run the migrations (scripts/artisan.sh migrate) and setup (scripts/setup.sh), and test everything thoroughly before deploying to live.
Package updates required:
- alberon/nexus: 4.5.0+
3.x to 4.x (12 Nov 2020)
Upgrade to Nexus 4.
2.x to 3.x (2 Nov 2020)
Upgrade to Nexus 3.
1.x to 2.x (9 Oct 2020)
Upgrade to Nexus 2.