Instead of using mutable functions (one / all) the best solution is to use logical operators ( & | ).
That way we get an extra function mixing both... can do things like that:
if (Auth::user()->hasRole('admin|employee&manager|employee&advanced')) {
//do something if:
//- user is admin
//- user is an employee manager
//- user is an employee with advanced role
}
Like in normal coding, the and operator has priority.
Instead of using mutable functions (one / all) the best solution is to use logical operators ( & | ). That way we get an extra function mixing both... can do things like that:
Like in normal coding, the and operator has priority.
Removed: getMethodName, getArrayFrom Included: matchOperator, mapOrAnd