If I already have an existing Laravel Jetstream (Inertia) project which was installed without the --teams
option is there a way to go back and install support for teams given that I have already created multiple controllers, models, migrations and other customizations within the app?
Thankfully, Jetstream allows you to enable team member invitations for your application with just a few lines of code. To get started, pass the invitations option when enabling the "teams" feature for your application. This may be done by modifying the features array of your application's config/jetstream.
Jetstream provides the implementation for your application's login, registration, email verification, two-factor authentication, session management, API via Laravel Sanctum , and optional team management features. Jetstream is designed using Tailwind CSS and offers your choice of Livewire or Inertia scaffolding.
Laravel Jetstream is free and opensource.
You should use Jetstream if: You're conversant with Laravel Livewire, Inertia, and tailwind or you don't mind taking time to learn them. You have an understanding. You want to immediately start building the core functionality of your app without investing much time in procedures.
AS A TEST, I did it here on my Jetstream LIVEWIRE project, by reinstalling Jetstream with --teams
. It's doable, but beware of some side effects.
What I did:
Publish Jetstream view files, if you haven't already:
php artisan vendor:publish --tag=jetstream-views
Update Jetstream to version 2.0 (upgrade guide)
Reinstall Jetstream with options --teams
:
php artisan jetstream:install livewire --teams
Warning: This will install the remaining actions, models, factories, and tests and will update several files, among those some view files, including on the layout views folder, so be careful and have them in source control or in a backup BEFORE trying this. Some view files will change entirely, so you will have to manually merge the changes with your old ones.
Run the migrations that were created
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With