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 Koch14mo ago
What is not working? Is auth()->user() available? What's the value of auth()->user()->isHrAdmin()? Did you do any debugging here?

Did you find this page helpful?