Notifications
Is it possible to create two separate tables for different panels? I want to retrieve notifications for both user and admin panels. In other words, I'm looking to create two distinct tables for notifications tailored to each panel's needs.
I searched the Filament docs, but I couldn't find any guides related to this.
3 Replies
I assume you mean different mysql tables per panel? That is more a laravel thing than filament. Just specify in the different models which table they should use. If there is a lot of overlap you can maybe better look into multi tenancy, docs are full of useful information about how to do that.
Not sure how that would work. We are just using Laravel Database notifications under the hood
I've implemented two distinct panels for authentication: one for organizations and another for admins. Each has its own login model. I've set up separate guards and providers for each panel as follows:
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'admins' => [
'driver' => 'session',
'provider' => 'admins',
],
'organizations' => [
'driver' => 'session',
'provider' => 'organizations',
],
],
'providers' => [
'admins' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', App\Models\Admin::class),
],
'organizations' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', App\Models\Organization::class),
],
'users' => [
'driver' => 'eloquent',
'model' => env('AUTH_MODEL', App\Models\User::class),
],
],
This structure ensures separate authentication workflows for admins and organizations. Now , I'm looking to create two distinct tables for notifications tailored to each panel's needs .