F
Filament13mo ago
anitexs

Tenant Settings page under provider

I'm unaware if this is a coding issue on my end or a bug. I've created a custom page called Settings which have the name filament.app.pages.settings. When I dump this in a test route outside Filament I get this "http://localhost/app/dwa/settings" // routes/web.php:29 When I try this:
->tenantMenuItems([
MenuItem::make()
->label('Settings')
->url(route('filament.app.pages.settings'))
->icon('heroicon-m-cog-8-tooth'),
// ...
])
->tenantMenuItems([
MenuItem::make()
->label('Settings')
->url(route('filament.app.pages.settings'))
->icon('heroicon-m-cog-8-tooth'),
// ...
])
under my provider it says the route name does not exist?
Solution:
@anitexs You have to do a closure inside it for it to work. The docs are wrong on this so I guess open an issue or I can. But do this instead. For a page inside a panel that DOESN'T have tenancy you can do one of these:...
Jump to solution
34 Replies
anitexs
anitexs13mo ago
Brian Kidd
Brian Kidd13mo ago
Run php artisan route:list to see what the route is named
anitexs
anitexs13mo ago
That's where I got the name from 🙂
anitexs
anitexs13mo ago
awcodes
awcodes13mo ago
What if you did ->url(SettingsPage::getUrl()). Might not be the correct text but it’s typically better to call the url off the class than to use the route helper in a filament context.
anitexs
anitexs13mo ago
anitexs
anitexs13mo ago
Still the same
anitexs
anitexs13mo ago
And I am reffering to the correct settings page
awcodes
awcodes13mo ago
Do you mind sharing the Settings class you are using. Maybe even a dumb question but is this you’re only panel and if so does it have ->default() on it? Might even need getUrl(panel: ‘panel-id’) Default should take care of that though.
anitexs
anitexs13mo ago
I have the admin panel which is not a tenant based. Then I have the App Panel which is Tenant based. I have two tenants in my test enviroment right now.
awcodes
awcodes13mo ago
Two panels you mean?
anitexs
anitexs13mo ago
Yes.
awcodes
awcodes13mo ago
At least one of them needs default() otherwise it will break things.
anitexs
anitexs13mo ago
I've placed the default on the App now Still same issue
anitexs
anitexs13mo ago
Want results from more Discord servers?
Add your server