Gate.php 1.4KB

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