Gate (Contracts)

Gate

interface Gate (View source)

Methods

bool has( string $ability)

Determine if a given ability has been defined.

$this define( string $ability, callable|string $callback)

Define a new ability.

$this policy( string $class, string $policy)

Define a policy class for a given class type.

bool check( string $ability, array|mixed $arguments = array())

Determine if the given ability should be granted.

Details

bool has( string $ability)

Determine if a given ability has been defined.

Parameters

string $ability

Return Value

bool

$this define( string $ability, callable|string $callback)

Define a new ability.

Parameters

string $ability
callable|string $callback

Return Value

$this

$this policy( string $class, string $policy)

Define a policy class for a given class type.

Parameters

string $class
string $policy

Return Value

$this

bool check( string $ability, array|mixed $arguments = array())

Determine if the given ability should be granted.

Parameters

string $ability
array|mixed $arguments

Return Value

bool

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Contracts/Auth/Access/Gate.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部