The check_access
method below returns true
but the check_access_level
returns false for both the accountant and the marketer. What could be the problem?
private static function check_access_level($value)
{
//dd(self::hierarchy_access_subject('accountant')); //returns false
//dd(self::hierarchy_access_subject('marketer')); //returns false
return self::hierarchy_access_team_leader($value);
}
public static function check_access()
{
$roles = ['accountant','marketer'];
return array_walk($roles, 'self::check_access_level');
}