Get Current Panel id issue
I have two panel at the moment "app", and "jobseekers". I tried to dump the current panel id on one of my resource class inside jobseekers panel but the return string is "app".
9 Replies
Resources are not actual components but shells to reduce code duplication. The code is likely evaluated before Middelwares are run, so it cannot identify the "current panel".
You probably need to wrap your logic in a Closure. Best to show some code and explain what you want to do,
I guess the main issue is I have these routes listed / registered
but when trying to register a profile menu item, I get this error
"Route [filament.jobseekers.resources.account.edit] not defined."
Same issue: This is a ServiceProvider. It's run before routes are registered. You need to wrap stuff in a Closure:
based on the userMenuItems of panel it only accepts array
Solution
Add the Closure to the MenuItem then instead
->url(fn () => ...)
Btw. instead of using route file, use
JobSeekersResource::getUrl('edit', 1)
Got it, thank you!