Back to School: coupon SCHOOL25 for 40% off Yearly/Lifetime membership! Read more here

Filament Sales Management: Multi-Tenancy with Super Admin

Filament 4

Creating a sales panel with transactions and a dashboard displaying sales statistics.

01JTQXA1DSXZA8BM9P48SK2YW5

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.

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 148 Premium Examples for $99