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\AuthenticateSession and add Alberon\NexusUsers\Http\Middleware\EnsureUserIsEnabled to App\Http\Kernel (see the template).

  • Remove Authenticable, Authorizable, CanResetPassword, MustVerifyEmail and Notifiable, and their relevant contracts, from App\NexusUsers\Models\User (they are now in the parent class).

  • Either remove $casts from App\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 from Database\Factories\UserFactory (it is now defined in the parent class) or update it to include first_name, last_name, enabled and notes, and remove name.

  • Optionally delete 2014_10_12_000000_create_users.php and 2014_10_12_100000_create_password_resets_table.php from database/migrations/ (they are now included in the package) - unless they have been customised.

  • Update Database\Seeders\RoleSeeder with the new permissions (see the template).

  • Add ->active() to Database\Seeders\UserSeeder to 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.