© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago
erigra.

Reusing same Resource in multiple panels?

Hey, I'm building a multi tenant site, and I have 2 panels - the admin panel and tenant panel.
I want to reuse the same Resource (or is that bad?) in both panels, but the permissions should be different. Admin panel would require view_any permission while the tenant panel should have "manage_own" permission required to access the list view of the resource.

I'm thinking I can add the canViewAny() method on the resource and conditionally check the current panel, but it seems it is not possible to get current panel?

Something like this:
public static function canViewAny(): bool
    {
        return currentPanel === 'admin' ? $user->can('view_any') : $user->can('manage_own');
    }
public static function canViewAny(): bool
    {
        return currentPanel === 'admin' ? $user->can('view_any') : $user->can('manage_own');
    }

Or what would be the suggest approach for this?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

resource in multiple panels
FilamentFFilament / ❓┊help
2y ago
Reuse the same Resources in multiple panels
FilamentFFilament / ❓┊help
3y ago
use the same route in multiple panels
FilamentFFilament / ❓┊help
3y ago
Multiple panels and resource access (routes)
FilamentFFilament / ❓┊help
12mo ago