© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
Roberto

Multi tenant team and user question

Hello there,
i want users to create a team and invite other users
in multi tenant filament setup.

is this how i do it?
  // users table
  Schema::create('users', function (Blueprint $table) {
      $table->id();
      $table->string('name');
      $table->string('email')->unique();
      $table->string('password');
  });

  // teams table  
  Schema::create('teams', function (Blueprint $table) {  
      $table->id();  
      $table->string('name');
      $table->text('description');
  });

  // team_user pivot table
  Schema::create('team_user', function (Blueprint $table) {
      $table->unsignedBigInteger('user_id');
      $table->unsignedBigInteger('team_id');
  });
  // users table
  Schema::create('users', function (Blueprint $table) {
      $table->id();
      $table->string('name');
      $table->string('email')->unique();
      $table->string('password');
  });

  // teams table  
  Schema::create('teams', function (Blueprint $table) {  
      $table->id();  
      $table->string('name');
      $table->text('description');
  });

  // team_user pivot table
  Schema::create('team_user', function (Blueprint $table) {
      $table->unsignedBigInteger('user_id');
      $table->unsignedBigInteger('team_id');
  });
Solution
Looks good... Make sure to setup the relationship on both User and Team models.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Notifications and Multi Tenant
FilamentFFilament / ❓┊help
3y ago
Get user relationship for multi-tenant
FilamentFFilament / ❓┊help
13mo ago
multi-tenant with multi domains?
FilamentFFilament / ❓┊help
2y ago
how install multi tenant multi database?
FilamentFFilament / ❓┊help
3y ago