Авторизация
класс Authorize (Просмотреть исходный код)
Свойства
| protected Gate | $gate | Экземпляр класса Gate. |
Методы
| void | __construct(Gate $gate)
Создаёт новый экземпляр middleware. | |
| static string | using(string $ability, string ...$models)
Указывает способность и модели для middleware. | |
| mixed | handle(Request $request, Closure $next, string $ability, array|null ...$models)
Обрабатывает входящий запрос. | |
| Model|array|string | getGateArguments(Request $request, array|null $models)
Получает аргументы для Gate. | |
| Model|string | getModel(Request $request, string $model)
Получает модель для авторизации. | |
| bool | isClassName(string $value)
Проверяет, является ли заданная строка полным именем класса. |
Подробности
void __construct(Gate $gate)
Создаёт новый экземпляр middleware.
static string using(string $ability, string ...$models)
Указывает способность и модели для middleware.
mixed handle(Request $request, Closure $next, string $ability, array|null ...$models)
Обрабатывает входящий запрос.
protected Model|array|string getGateArguments(Request $request, array|null $models)
Получает аргументы для Gate.
protected bool isClassName(string $value)
Проверяет, является ли заданная строка полным именем класса.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Auth/Middleware/Authorize.html