© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
SheepBild

Best practice : Multiple pages on Resource

Hello,
I have a more theorical than practical question :
I make an application for yoga, trainings, workshops reservations. Each of these section of the menu has 3 pages :
- List of objects (eg : list of yoga courses with CRUD)
- List of events (eg : list of yoga sessions with CRUD on "Event" object)
- Calendar of event (eg : list of yoga sessions in a calendar view (with Saade plugin)

I tried to make 3 pages in my YogaResource folder but I can't find how to register navigation for a Page of a Resource ; these functions doesn't work :

    protected static ?string $modelLabel = 'TEST';

    public static function shouldRegisterNavigation(): bool
    {
        return true;
    }
    protected static ?string $modelLabel = 'TEST';

    public static function shouldRegisterNavigation(): bool
    {
        return true;
    }
Solution
If these resources and pages are all part of a Panel, then you can register the Pages into the panel definition, or have the Panel auto-discover the pages in the Pages directory.

eg:
        ->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\\Filament\\App\\Resources')
        ->discoverPages(in: app_path('Filament/App/Pages'), for: 'App\\Filament\\App\\Pages')
        ->pages([
            Pages\Dashboard::class,
        ])
        ->discoverResources(in: app_path('Filament/App/Resources'), for: 'App\\Filament\\App\\Resources')
        ->discoverPages(in: app_path('Filament/App/Pages'), for: 'App\\Filament\\App\\Pages')
        ->pages([
            Pages\Dashboard::class,
        ])
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Resource Scoping Best Practice
FilamentFFilament / ❓┊help
2y ago
Best practice for multiple dynamic properties
FilamentFFilament / ❓┊help
15mo ago
Multiple edit pages for a single resource
FilamentFFilament / ❓┊help
15mo ago
Multiple resource
FilamentFFilament / ❓┊help
2y ago