Skip to content
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

Use custom TeamInvitation model in TeamInvitationController #897

Merged
merged 1 commit into from
Oct 1, 2021
Merged

Use custom TeamInvitation model in TeamInvitationController #897

merged 1 commit into from
Oct 1, 2021

Conversation

ManuelLeiner
Copy link
Contributor

Description

Use the custom TeamInvitation class in the accept and destroy methods of the TeamInvitationController to retrieve the invitation model.

Motivation

Fixes #890.

Solution

BREAKING: Removes the type-hint from the controller methods. Therefore the model will not be resolved by the framework and the invitation id will be passed to the controller. Uses the invitation id and the Jetstream helper to query and retrieve an instance of the custom TeamInvitation. Uses firstOrFail as the route model binding responds with a ModelNotFoundException as well when an invalid id is passed.

@ManuelLeiner
Copy link
Contributor Author

@driesvints hope that is all correctly configured and the way of contributing to the next major release.

@ManuelLeiner
Copy link
Contributor Author

Do we need some information/text on how to upgrade?

Copy link
Member

@driesvints driesvints left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@taylorotwell taylorotwell merged commit afae78f into laravel:master Oct 1, 2021
Zen0x7 added a commit to Zen0x7/jetstream that referenced this pull request Oct 18, 2021
GeoSot pushed a commit to GeoSot/jetstream that referenced this pull request Jan 11, 2022
GeoSot pushed a commit to GeoSot/jetstream that referenced this pull request Jan 27, 2022
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.

None yet

3 participants