I’ve started building a new portal for work, after many iterations we have settled on Laravel 8 and Jetstream. We don’t want these unused entries clogging up the database, as we will consider a team as a company that we transact with.
Great, we create a user and now get no team, but also an error on login: Let’s overwrite some of the Traits in HasTeams to make these optional! Create app/Traits/HasNoPersonalTeam.php with the following contents: We now need to update the User model app/Models/User.php and overwrite two methods on the Jetstream HasTeams trait. We’ll now create a new Middleware to verify that the user has a team and redirect to the jetstream create team page if not.