F
Filament15mo 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();
}
// 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
No description
No description
Solution:
I gave ->default() to AppPanelProvider and remove from Admin and it's working as expected..
Jump to solution
1 Reply
Solution
Vp
Vp15mo ago
I gave ->default() to AppPanelProvider and remove from Admin and it's working as expected..
Want results from more Discord servers?
Add your server