Gate::denies PHP Méthode

denies() public static méthode

Determine if the given ability should be denied for the current user.
public static denies ( string $ability, array | mixed $arguments = [] ) : boolean
$ability string
$arguments array | mixed
Résultat boolean
        public static function denies($ability, $arguments = array())
        {
            return \Illuminate\Auth\Access\Gate::denies($ability, $arguments);
        }

Usage Example

 /**
  * Handle an incoming request.
  *
  * @param \Illuminate\Http\Request $request
  * @param \Closure                 $next
  * @param $value
  *
  * @return mixed
  */
 public function handle($request, Closure $next, $value)
 {
     if (\Gate::denies($value)) {
         app()->abort(403, 'Missing permission \'' . $value . '\'');
     }
     return $next($request);
 }
All Usage Examples Of Gate::denies