Is there any way to create a custom page but not under in a tenant? Its like a general page

Just like the title, I want to ask how to create a custom page where it doesnt fall to any tenant. I just want to access this page without needing to add the tenant slug or something.
3 Replies
icolatsi22
icolatsi223w ago
You can, create the page and add a custom route for it in web: Public Page (no login):
Route::get('/custom-page/{parameter}', \App\Pages\CustomPage::class)
->name('custom-page');
Route::get('/custom-page/{parameter}', \App\Pages\CustomPage::class)
->name('custom-page');
Private Page:
Route::get('/custom-page/{parameter}', \App\Pages\CustomPage::class)
->name('custom-page')->middleware(['auth']);
Route::get('/custom-page/{parameter}', \App\Pages\CustomPage::class)
->name('custom-page')->middleware(['auth']);
oh, and you can access the parameter in mount method in the page:
public function mount($paramater): void
{
...
}
public function mount($paramater): void
{
...
}
i used 'parameter' as an example, you can use whatever: /{user_id} mount($user_id)
jaocero
jaocero3w ago
how do I regiter this page in the sidebar of the panel?
icolatsi22
icolatsi223w ago
search for shouldRegisterNavigation on the docs