Skip to content

TeamInvitationController.php uses Laravel\Jetstream\TeamInvitation instead of App\Models\TeamInvitation created by stubs #1141

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

Closed
sicaboy opened this issue Sep 17, 2022 · 4 comments

Comments

@sicaboy
Copy link

sicaboy commented Sep 17, 2022

  • Jetstream Version: 2.11.2
  • Jetstream Stack: Inertia & Livewire
  • Uses Teams: yes & no
  • Laravel Version: 9.27.0
  • PHP Version: 8.1
  • Database Driver & Version:

Description:

The TeamInvitationController.php uses Laravel\Jetstream\TeamInvitation as injection in accept(...,TeamInvitation $invitation) and destroy(...,TeamInvitation $invitation)instead ofApp\Models\TeamInvitation` created by stubs.

This makes the custom Model classes useless.

Steps To Reproduce:

Example:

  • Change the DB connection for the model App\Models\TeamInvitation
  • When adding invitations & removing invitations, it ignores the custom DB connection, because the DI uses the Laravel\Jetstream\TeamInvitation instead.
@sicaboy
Copy link
Author

sicaboy commented Sep 17, 2022

I saw this issue had been addressed here #890 but in the latest release, the fix wasn't merged.

@sicaboy
Copy link
Author

sicaboy commented Sep 17, 2022

I saw the fix was reverted here 220787a

@driesvints
Copy link
Member

Right now, we have no plans for this. Anyone can attempt a new PR to master.

@sicaboy
Copy link
Author

sicaboy commented Sep 19, 2022

I have done a workaround by copying the controller and overwriting the route.

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

No branches or pull requests

2 participants