Route [filament.app.resources.events.index] not defined.

Hi! When using url(route('filament.app.resources.events.index', ['tenant' => Filament::getTenant()])) in the AppPanelProvider I get Route [filament.app.resources.events.index] not defined. php artisan route:list --name=events
GET|HEAD {tenant}/events ............... filament.app.resources.events.index › App\Filament\Resources\EventResource\Pages\ListEvents Using the same url(route('filament.app.resources.events.index', ['tenant' => Filament::getTenant()])) on the EventResource/Pages/ListEvents.php works. Why? Is the named routes not available in the AppPanelProvider?
Solution:
1. Don't call routes directly. Use EventResource::getUrl() 2. The routes probably haven't been registered yet. Try wrapping the code in a Closure...
Jump to solution
2 Replies
Solution
Dennis Koch
Dennis Koch7mo ago
1. Don't call routes directly. Use EventResource::getUrl() 2. The routes probably haven't been registered yet. Try wrapping the code in a Closure
tobias.sioland
tobias.siolandOP7mo ago
Thanks! \Filament\Navigation\NavigationItem::make('Auskultation') ->url(function() { return EventResource::getUrl() . '?activeTab=Auscultation'; }) Works!
Want results from more Discord servers?
Add your server