-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
Gate.php
40 lines (37 loc) · 1.93 KB
/
Gate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace Illuminate\Support\Facades;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
/**
* @method static \Illuminate\Auth\Access\Gate guessPolicyNamesUsing(callable $callback)
* @method static \Illuminate\Auth\Access\Response authorize(string $ability, array|mixed $arguments = [])
* @method static \Illuminate\Auth\Access\Response inspect(string $ability, array|mixed $arguments = [])
* @method static \Illuminate\Auth\Access\Response allowIf(\Closure|bool $condition, string|null $message = null, mixed $code = null)
* @method static \Illuminate\Auth\Access\Response denyIf(\Closure|bool $condition, string|null $message = null, mixed $code = null)
* @method static \Illuminate\Contracts\Auth\Access\Gate after(callable $callback)
* @method static \Illuminate\Contracts\Auth\Access\Gate before(callable $callback)
* @method static \Illuminate\Contracts\Auth\Access\Gate define(string $ability, callable|string $callback)
* @method static \Illuminate\Contracts\Auth\Access\Gate forUser(\Illuminate\Contracts\Auth\Authenticatable|mixed $user)
* @method static \Illuminate\Contracts\Auth\Access\Gate policy(string $class, string $policy)
* @method static array abilities()
* @method static bool allows(string $ability, array|mixed $arguments = [])
* @method static bool any(iterable|string $abilities, array|mixed $arguments = [])
* @method static bool check(iterable|string $abilities, array|mixed $arguments = [])
* @method static bool denies(string $ability, array|mixed $arguments = [])
* @method static bool has(string $ability)
* @method static mixed getPolicyFor(object|string $class)
* @method static mixed raw(string $ability, array|mixed $arguments = [])
*
* @see \Illuminate\Contracts\Auth\Access\Gate
*/
class Gate extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return GateContract::class;
}
}