Creating a sales panel with transactions and a dashboard displaying sales statistics.
This project has two Filament panels:
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.