Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

myregistration's avatar

How do you assign a particular Filament panel to a custom page?

I created a custom filament page via CLI and used the flag --panel=organization but the custom page is being displayed in a different panel UI. I tried the following method I found somewhere, but doesn't appear to work

    public static function getPanel(): ?Panel
    {
        return Panel::make('organization');
    }

The blade view uses the following, but don't see a way to assign the panel

<x-filament-panels::page>
    <div>
        {{ $this->table }}
    </div>
</x-filament-panels::page>
0 likes
5 replies
Lopsum's avatar

👋 I suggest you look in the Provider panel where you want the page to be shown. You should normally see this configuration there:


public function p
{
    return $panel
        ->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages')

You can modify this method to set a new path where your specific pages will be stored.

myregistration's avatar

@Vable The custom page is within the directory that is included in the Panel's discoverPages() path, so it's weird it's not using the Panel.

myregistration's avatar

@Vable It's using my default Panel to display the page. I've created a custom route for the page, so that might make the difference. The route still contains the Panel's path and the page resides in the Panel's discover path though. When I use the filament route it uses the correct panel. It's too bad we can't assign a panel to the page itself.

newbie360's avatar

@myregistration Do you means created a page via this command and want the page belongsTo a specific panel only?

php artisan make:filament-page

the created page is extends Page , and the page class has this

protected static bool $isDiscovered = true;

// and

    public static function isDiscovered(): bool
    {
        return static::$isDiscovered;
    }

since there no DocBlock description, i guess just put this in your created Page class

protected static bool $isDiscovered = false;

and then in any panel add your created Page

    public function panel(Panel $panel): Panel
    {
        return $panel
			// ...
            ->pages([
                Pages\Dashboard::class,
                \App\Filament\Pages\YourPage::class,
            ])

i don't know if this work

Please or to participate in this conversation.