FilamentF
Filament3y ago
Vp

App panel with custom url showing admin panel layouts

I create app panel (I use this for landing page) and I remove Authenticate middlewire. I display content in pages, and working perfect. Now I need to create specific url like {host}/lyrics/{slug}, for this I create another page, hide from navigation, but when I map with my custom url, it shows admin panel layouts.

// url
Route::get('lyrics/{slug}', App\Filament\App\Pages\LyricDetail::class);

// LyricDetail.php
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static bool $shouldRegisterNavigation = false;

protected static string $view = 'filament.app.pages.lyric-detail';

public $lyric;

public function mount($slug): void
{
    $this->lyric = Lyric::whereSlug($slug)->firstOrFail();
}

Bg-white image is normal one, If I didnot hide from navigation and didn't check anything then I get inside my app panel when I click from nav bar
dark image is after I hide from navigation and check inside mount() and call from my custom url lyrics/{slug}

What should be the problem and thanks in advance
Screenshot_from_2023-09-23_09-55-11.png
Screenshot_from_2023-09-23_09-54-33.png
Solution
I gave ->default() to AppPanelProvider and remove from Admin and it's working as expected..
Was this page helpful?