Model Label Based on User ID

Please i tried this but it is not working
public static function getModelLabel(): string
{
if (auth()->user()->isHrAdmin()) {
return __('Appraisal Investment');

}
return __('Appraisal Request');

}
public static function getModelLabel(): string
{
if (auth()->user()->isHrAdmin()) {
return __('Appraisal Investment');

}
return __('Appraisal Request');

}
1 Reply
Dennis Koch
Dennis Koch13mo ago
What is not working? Is auth()->user() available? What's the value of auth()->user()->isHrAdmin()? Did you do any debugging here?
Want results from more Discord servers?
Add your server