How to translate userMenuItems i panel?

public function panel(Panel $panel): Panel { return $panel ->id('app') ->default() ->path('app') ... ... ->userMenuItems([ MenuItem::make() ->label(__('User profile')) ->url('user/profile') ->icon('heroicon-o-cog-6-tooth'), // ... ]) ... }
this will result error: Target class [translator] does not exist. Do you have another way?
2 Replies
.najibahmed
.najibahmedOP15mo ago
If got the solution: ->label(fn () => __('User profile'))
Dakaa
Dakaa14mo ago
@Najib Ahmed thankyou
Want results from more Discord servers?
Add your server