Courses

Laravel 12 Multi-Tenancy: All You Need To Know

Jetstream Teams: Installation & Two CRUDs with Team Filter

You're reading a FREE PREVIEW of a PREMIUM course.
Summary of this lesson:
- Installing Laravel Jetstream with teams feature
- Exploring built-in team management interface
- Setting up Projects and Tasks with team filtering
- Implementing team-based Global Scope

Laravel Jetstream isn't officially presented as a multi-tenancy package. But looking at the things that we have already done in this course, Jetstream does a similar thing helping us to divide users by teams as one of its features.

The Teams feature includes member management, invitations, roles and permissions, inspecting current teams, and other functions. Let's briefly cover how it works and how Jetstream can help us with multi-tenancy.


Jetstream Installation

Jetstream should only be installed in a new Laravel project. Jetstream offers two frontend stacks: Livewire and Inertia.js. We will be using the Livewire stack. Jetstream can be installed in several ways. One of the ways is to provide options for a Laravel installer.

laravel new tenancy --jet --stack=livewire --teams

After registering, in the navigation we can see a dropdown for managing a team.

In the Team Settings page, we can change the team's name and invite new members to the team. It's similar to what we have done previously with team invitations.

We can create a new team and switch between teams.

The users table in the database has a current_team_id column.

Again, it's very similar to what we have done earlier.

The whole team management and all of that stuff is done partly...

The full lesson is only for Premium Members.
Want to access all 22 lessons of this course? (88 min read)

You also get:

  • 76 courses
  • Premium tutorials
  • Access to repositories
  • Private Discord