Gate.php 1.9 KB

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