Skip to content

Laravel 11 support #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 22, 2025
Merged

Laravel 11 support #16

merged 11 commits into from
Feb 22, 2025

Conversation

avvertix
Copy link
Contributor

@avvertix avvertix commented Feb 9, 2025

No description provided.

@avvertix
Copy link
Contributor Author

Use cast method instead of property

The generated Identity model used to have the casts property. This should be changed to use the cast method

/**
  * Get the attributes that should be cast.
  *
  * @return array<string, string>
  */
protected function casts(): array
{
    return [
        'expires_at' => 'datetime',
        'registration' => 'bool',
    ];
}

@avvertix
Copy link
Contributor Author

avvertix commented Feb 13, 2025

Default user model and identity model namespace (breaking change)

  • User model is assumed to be in the models directory, If you are upgrading from an older version considering setting the user model on the identity facade
  • Identity model is assumed to be in the models directory, If you are upgrading from an older version considering setting the identity model on the identity facade

Within the AppServiceProvider boot method call

\Oneofftech\Identities\Facades\Identity::useIdentityModel(Identity::class);
\Oneofftech\Identities\Facades\Identity::useUserModel(User::class);

If you previously set models namespace manually to use the models folder you can now remove the configuration.

@avvertix
Copy link
Contributor Author

Default redirect URL

The default redirect after login/registration is now to / unless explicitly configured using the redirectTo() method in each controller.

@avvertix avvertix marked this pull request as ready for review February 13, 2025 22:00
@avvertix avvertix merged commit 73f4a31 into master Feb 22, 2025
8 checks passed
@avvertix avvertix deleted the laravel-11-compatibility branch February 22, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant