Roles: Broker vs Investor in Multiple Panels

Filament 3
Also available in Filament 4/5 version

When working on multiple-role systems, separating the Resources per role is often a good idea. For this, Filament comes with out-of-the-box support for multiple panels. This allows us to create different designs and colored interfaces for clear indication.

FilamentExamples ThumbBase (28)

Get the Source Code:

Only This Example

$9

One-time payment

Full source code for Roles: Broker vs Investor in Multiple Panels
Downloadable ZIP file with the source code
Lifetime access to this example
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 169 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 169 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

30-day money-back guarantee

How it works

We have the Auth Panel, which is only responsible for log-in and registration. The path for this panel is set to root, and pages, resources, and widgets auto-discovery are removed.

app/Providers/Filament/AuthPanelProvider.php:

use App\Filament\Pages\Auth\Register;
 
class AuthPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->default()
->id('auth')
->path('')
->login()
->registration(Register::class)
->colors([
'primary' => Color::Amber,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
]);
}
}

After logging in or registering to redirect the user to the correct resource and panel, the response is created and added to the AppServiceProvider as a singleton.

app/Http/Responses/LoginResponse.php:

use Illuminate\Http\RedirectResponse;
use Livewire\Features\SupportRedirects\Redirector;
use Filament\Http\Responses\Auth\LoginResponse as BaseLogin;
 
class LoginResponse extends BaseLogin
{
// ...

We also have an example of how to do this using a Single Panel

The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.