3
votes

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?

1

1 Answers

3
votes

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:

Step 1: Publish Jetstream view files if you haven't already: php artisan vendor:publish --tag=jetstream-views

Step2: Update Jetstream to version 2.0: upgrade guide

Step 3: Reinstall it 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.

Step 4: Run the migrations that were created