Filament Sales Management: Multi-Tenancy with Super Admin

Manage your Sales in this Multi-Tenancy management application with Super Admin functionality

FilamentExamples ThumbBase (3)

Get the Source Code:

How it works

This project has two Filament panels:

  • Superadmin: to manage the application by managing users and stores
  • Admin: to manage sales transactions and reports for an active tenant (shop)

The admin panel is tenant-aware. In this case, the tenant is a Shop, which is set in the AdminPanelProvider.

app/Providers/Filament/AdminPanelProvider.php:

use App\Models\Store;
 
class AdminPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
// ...
->tenant(Store::class)
->tenantMenu();
}
}

Also, the Filament\Models\Contracts\HasTenants interface must be implemented on the User Model when setting up multi-tenancy. If the user has access to the tenant, it is defined in the User Model.

app/Models/User.php:

use Filament\Models\Contracts\HasTenants;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
 
class User extends Authenticatable implements FilamentUser, HasTenants
{
// ...

Next, we will:

  • Configure Tenant Access
  • Create Dashboard
  • Create Super Admin Panel with Dashboard
  • Create Widgets and Quick Actions
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.
Get the Source Code: All 73 Premium Examples for $99