authorize() public static méthode

Determine if the given ability should be granted for the current user.
public static authorize ( string $ability, array | mixed $arguments = [] ) : Illuminate\Auth\Access\Response
$ability string
$arguments array | mixed
Résultat Illuminate\Auth\Access\Response
Exemple #1
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     return \Gate::authorize($this->input('id', null) ? 'update' : 'create', [$this->user(), $this->input('id')]);
 }