PHP 클래스 Gate, someline-starter

상속: extends Illuminate\Support\Facades\Gate
파일 보기 프로젝트 열기: someline/someline-starter 1 사용 예제들

공개 메소드들

메소드 설명
after ( callable $callback ) Register a callback to run after all Gate checks.
allows ( string $ability, array | mixed $arguments = [] ) : boolean Determine if the given ability should be granted for the current user.
authorize ( string $ability, array | mixed $arguments = [] ) : Illuminate\Auth\Access\Response Determine if the given ability should be granted for the current user.
before ( callable $callback ) Register a callback to run before all Gate checks.
check ( string $ability, array | mixed $arguments = [] ) : boolean Determine if the given ability should be granted for the current user.
define ( string $ability, callable | string $callback ) Define a new ability.
denies ( string $ability, array | mixed $arguments = [] ) : boolean Determine if the given ability should be denied for the current user.
forUser ( Illuminate\Contracts\Auth\Authenticatable | mixed $user ) : static Get a gate instance for the given user.
getPolicyFor ( object | string $class ) : mixed Get a policy instance for a given class.
has ( string $ability ) : boolean Determine if a given ability has been defined.
policy ( string $class, string $policy ) Define a policy class for a given class type.
resolvePolicy ( object | string $class ) : mixed Build a policy class instance of the given type.

메소드 상세

after() 공개 정적인 메소드

Register a callback to run after all Gate checks.
public static after ( callable $callback )
$callback callable

allows() 공개 정적인 메소드

Determine if the given ability should be granted for the current user.
public static allows ( string $ability, array | mixed $arguments = [] ) : boolean
$ability string
$arguments array | mixed
리턴 boolean

authorize() 공개 정적인 메소드

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
리턴 Illuminate\Auth\Access\Response

before() 공개 정적인 메소드

Register a callback to run before all Gate checks.
public static before ( callable $callback )
$callback callable

check() 공개 정적인 메소드

Determine if the given ability should be granted for the current user.
public static check ( string $ability, array | mixed $arguments = [] ) : boolean
$ability string
$arguments array | mixed
리턴 boolean

define() 공개 정적인 메소드

Define a new ability.
public static define ( string $ability, callable | string $callback )
$ability string
$callback callable | string

denies() 공개 정적인 메소드

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
리턴 boolean

forUser() 공개 정적인 메소드

Get a gate instance for the given user.
public static forUser ( Illuminate\Contracts\Auth\Authenticatable | mixed $user ) : static
$user Illuminate\Contracts\Auth\Authenticatable | mixed
리턴 static

getPolicyFor() 공개 정적인 메소드

Get a policy instance for a given class.
public static getPolicyFor ( object | string $class ) : mixed
$class object | string
리턴 mixed

has() 공개 정적인 메소드

Determine if a given ability has been defined.
public static has ( string $ability ) : boolean
$ability string
리턴 boolean

policy() 공개 정적인 메소드

Define a policy class for a given class type.
public static policy ( string $class, string $policy )
$class string
$policy string

resolvePolicy() 공개 정적인 메소드

Build a policy class instance of the given type.
public static resolvePolicy ( object | string $class ) : mixed
$class object | string
리턴 mixed