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
icolatsi227mo 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
jaoceroOP7mo ago
how do I regiter this page in the sidebar of the panel?
icolatsi22
icolatsi227mo ago
search for shouldRegisterNavigation on the docs
Want results from more Discord servers?
Add your server