F
Filament15mo ago
Jessy

how to get edit url for user profile?

->userMenuItems([ 'profile' => MenuItem::make() ->label('Edit profile') ->url(UserResource::getUrl('edit', ['record' => Auth::user()])). I tried this but got error: Target class [hash] does not exist.
Solution:
When you use this stuff in a Service Provider you need to wrap in in a Closure so that it's not evaluated right away, but when Filament needs it, because services aren't ready yet. ->userMenuItems(fn () => [...])...
Jump to solution
2 Replies
Solution
Dennis Koch
Dennis Koch15mo ago
When you use this stuff in a Service Provider you need to wrap in in a Closure so that it's not evaluated right away, but when Filament needs it, because services aren't ready yet. ->userMenuItems(fn () => [...])
Jessy
JessyOP15mo ago
Thanks

Did you find this page helpful?