Маршрут
класс Маршрут расширяет Facade (Просмотреть исходный код)
Свойства
| статический защищенный Application|null | $app | Экземпляр приложения, которым управляет фейсад. | из Фейсад |
| статический защищенный массив | $resolvedInstance | Разрешенные экземпляры объектов. | из Фейсад |
| статический защищенный bool | $cached | Указывает, должен ли разрешенный экземпляр кэшироваться. | из Фейсад |
Методы
| static void | resolved(Closure $callback)
Запустить Closure, когда фасад был разрешен. | from Facade |
| static MockInterface | spy()
Преобразовать фасад в шпиона Mockery. | from Facade |
| static MockInterface | partialMock()
Инициализировать частичный макет на фасаде. | from Facade |
| static Expectation | shouldReceive()
Инициализировать ожидание макета на фасаде. | from Facade |
| static Expectation | expects()
Инициализировать ожидание макета на фасаде. | from Facade |
| static MockInterface | createFreshMockInstance()
Создать новый экземпляр макета для данного класса. | from Facade |
| static MockInterface | createMock()
Создать новый экземпляр макета для данного класса. | from Facade |
| static bool | isMock()
Определяет, установлен ли макет как экземпляр фасада. | from Facade |
| static string|null | getMockableClass()
Получить класс, который можно подделать, для связанного экземпляра. | from Facade |
| static void | swap(mixed $instance)
Быстрая замена базового экземпляра за фасадом. | from Facade |
| static bool | isFake()
Определяет, была ли установлена "подделка" в качестве экземпляра фасада. | from Facade |
| static mixed | getFacadeRoot()
Получить корневой объект за фасадом. | from Facade |
| static string | getFacadeAccessor()
Получить зарегистрированное имя компонента. | |
| static mixed | resolveFacadeInstance(string $name)
Разрешить корневой экземпляр фасада из контейнера. | from Facade |
| static void | clearResolvedInstance(string $name)
Очистить разрешенный экземпляр фасада. | from Facade |
| static void | clearResolvedInstances()
Очистить все разрешенные экземпляры. | from Facade |
| static Collection | defaultAliases()
Получить псевдонимы по умолчанию приложения. | from Facade |
| static Application|null | getFacadeApplication()
Получить экземпляр приложения за фасадом. | from Facade |
| static void | setFacadeApplication(Application|null $app)
Установить экземпляр приложения. | from Facade |
| static mixed | __callStatic(string $method, array $args)
Обрабатывать динамические, статические вызовы объекта. | from Facade |
| static Route | get(string $uri, array|string|callable|null $action = null) No description | |
| static Route | post(string $uri, array|string|callable|null $action = null) No description | |
| static Route | put(string $uri, array|string|callable|null $action = null) No description | |
| static Route | patch(string $uri, array|string|callable|null $action = null) No description | |
| static Route | delete(string $uri, array|string|callable|null $action = null) No description | |
| static Route | options(string $uri, array|string|callable|null $action = null) No description | |
| static Route | any(string $uri, array|string|callable|null $action = null) No description | |
| static Route | fallback(array|string|callable|null $action) No description | |
| static Route | redirect(string $uri, string $destination, int $status = 302) No description | |
| static Route | permanentRedirect(string $uri, string $destination) No description | |
| static Route | view(string $uri, string $view, array $data = [], int|array $status = 200, array $headers = []) No description | |
| static Route | match(array|string $methods, string $uri, array|string|callable|null $action = null) No description | |
| static void | resources(array $resources, array $options = []) No description | |
| static PendingResourceRegistration | resource(string $name, string $controller, array $options = []) No description |
| static void | apiResources(array $resources, array $options = []) Описание отсутствует | |
| static PendingResourceRegistration | apiResource(string $name, string $controller, array $options = []) Описание отсутствует | |
| static void | singletons(array $singletons, array $options = []) Описание отсутствует | |
| static PendingSingletonResourceRegistration | singleton(string $name, string $controller, array $options = []) Описание отсутствует | |
| static void | apiSingletons(array $singletons, array $options = []) Описание отсутствует | |
| static PendingSingletonResourceRegistration | apiSingleton(string $name, string $controller, array $options = []) Описание отсутствует | |
| static Router | group(array $attributes, Closure|array|string $routes) Описание отсутствует | |
| static array | mergeWithLastGroup(array $new, bool $prependExistingPrefix = true) Описание отсутствует | |
| static string | getLastGroupPrefix() Описание отсутствует | |
| static Route | addRoute(array|string $methods, string $uri, array|string|callable|null $action) Описание отсутствует | |
| static Route | newRoute(array|string $methods, string $uri, mixed $action) Описание отсутствует | |
| static Response | respondWithRoute(string $name) Описание отсутствует | |
| static Response | dispatch(Request $request) Описание отсутствует | |
| static Response | dispatchToRoute(Request $request) Описание отсутствует | |
| static array | gatherRouteMiddleware(Route $route) Описание отсутствует | |
| static array | resolveMiddleware(array $middleware, array $excluded = []) Описание отсутствует | |
| static Response | prepareResponse(Request $request, mixed $response) Описание отсутствует | |
| static Response | toResponse(Request $request, mixed $response) Описание отсутствует | |
| static Route | substituteBindings(Route $route) Описание отсутствует | |
| static void | substituteImplicitBindings(Route $route) Описание отсутствует | |
| static Router | substituteImplicitBindingsUsing(callable $callback) Описание отсутствует | |
| static void | matched(string|callable $callback) Описание отсутствует | |
| static array | getMiddleware() Описание отсутствует | |
| static Router | aliasMiddleware(string $name, string $class) Описание отсутствует | |
| static bool | hasMiddlewareGroup(string $name) Описание отсутствует | |
| static array | getMiddlewareGroups() Описание отсутствует | |
| static Router | middlewareGroup(string $name, array $middleware) Описание отсутствует | |
| static Router | prependMiddlewareToGroup(string $group, string $middleware) Описание отсутствует | |
| static Router | pushMiddlewareToGroup(string $group, string $middleware) Описание отсутствует | |
| static Router | removeMiddlewareFromGroup(string $group, string $middleware) Описание отсутствует | |
| static Router | flushMiddlewareGroups() Описание отсутствует | |
| static void | bind(string $key, string|callable $binder) Описание отсутствует | |
| static void | model(string $key, string $class, Closure|null $callback = null) Описание отсутствует | |
| static Closure|null | getBindingCallback(string $key) Описание отсутствует | |
| static array | getPatterns() Описание отсутствует | |
| static void | pattern(string $key, string $pattern) Описание отсутствует | |
| static void | patterns(array $patterns) Описание отсутствует | |
| static bool | hasGroupStack() Описание отсутствует | |
| static array | getGroupStack() Описание отсутствует | |
| static mixed | input(string $key, string|null $default = null) Описание отсутствует | |
| static Request | getCurrentRequest() Описание отсутствует |
| static Route|null | getCurrentRoute() Без описания | |
| static Route|null | current() Без описания | |
| static bool | has(string|array $name) Без описания | |
| static string|null | currentRouteName() Без описания | |
| static bool | is(mixed $patterns) Без описания | |
| static bool | currentRouteNamed(mixed $patterns) Без описания | |
| static string|null | currentRouteAction() Без описания | |
| static bool | uses(array $patterns) Без описания | |
| static bool | currentRouteUses(string $action) Без описания | |
| static void | singularResourceParameters(bool $singular = true) Без описания | |
| static void | resourceParameters(array $parameters = []) Без описания | |
| static array|null | resourceVerbs(array $verbs = []) Без описания | |
| static RouteCollectionInterface | getRoutes() Без описания | |
| static void | setRoutes(RouteCollection $routes) Без описания | |
| static void | setCompiledRoutes(array $routes) Без описания | |
| static array | uniqueMiddleware(array $middleware) Без описания | |
| static Router | setContainer(Container $container) Без описания | |
| static void | macro(string $name, object|callable $macro) Без описания | |
| static void | mixin(object $mixin, bool $replace = true) Без описания | |
| static bool | hasMacro(string $name) Без описания | |
| static void | flushMacros() Без описания | |
| static mixed | macroCall(string $method, array $parameters) Без описания | |
| static RouteRegistrar | attribute(string $key, mixed $value) Без описания | |
| static RouteRegistrar | whereAlpha(array|string $parameters) Без описания | |
| static RouteRegistrar | whereAlphaNumeric(array|string $parameters) Без описания | |
| static RouteRegistrar | whereNumber(array|string $parameters) Без описания | |
| static RouteRegistrar | whereUlid(array|string $parameters) Без описания | |
| static RouteRegistrar | whereUuid(array|string $parameters) Без описания | |
| static RouteRegistrar | whereIn(array|string $parameters, array $values) Без описания | |
| static RouteRegistrar | as(string $value) Без описания | |
| static RouteRegistrar | controller(string $controller) Без описания | |
| static RouteRegistrar | domain(string $value) Без описания | |
| static RouteRegistrar | middleware(array|string|null $middleware) Без описания | |
| static RouteRegistrar | missing(Closure $missing) Без описания | |
| static RouteRegistrar | name(string $value) Без описания | |
| static RouteRegistrar | namespace(string|null $value) Без описания | |
| static RouteRegistrar | prefix(string $prefix) Без описания | |
| static RouteRegistrar | scopeBindings() Без описания | |
| static RouteRegistrar | where(array $where) Без описания | |
| static RouteRegistrar | withoutMiddleware(array|string $middleware) Без описания | |
| static RouteRegistrar | withoutScopedBindings() Без описания |
Подробности
static void resolved(Closure $callback)
Выполнить замыкание, когда фасад будет разрешён.
static MockInterface spy()
Преобразовать фасад в шпион Mockery.
static MockInterface partialMock()
Инициализировать частичный макет на фасаде.
static Expectation shouldReceive()
Инициализировать ожидание макета на фасаде.
static Expectation expects()
Инициализировать ожидание макета на фасаде.
static protected MockInterface createFreshMockInstance()
Создать новый экземпляр макета для данного класса.
static protected MockInterface createMock()
Создать новый экземпляр макета для данного класса.
static protected bool isMock()
Определяет, установлен ли макет в качестве экземпляра фасада.
static protected string|null getMockableClass()
Получить класс, подлежащий макетированию, для связанного экземпляра.
static void swap(mixed $instance)
Произвести горячую замену базового экземпляра за фасадом.
static protected bool isFake()
Определяет, установлен ли «фальшивка» в качестве экземпляра фасада.
static mixed getFacadeRoot()
Получить корневый объект за фасадом.
static protected string getFacadeAccessor()
Получить зарегистрированное имя компонента.
static protected mixed resolveFacadeInstance(string $name)
Разрешить экземпляр корня фасада из контейнера.
static void clearResolvedInstance(string $name)
Очистить разрешенный экземпляр фасада.
static void clearResolvedInstances()
Очистить все разрешенные экземпляры.
static Collection defaultAliases()
Получить стандартные псевдонимы приложения.
static Application|null getFacadeApplication()
Получить экземпляр приложения за фасадом.
static void setFacadeApplication(Application|null $app)
Установить экземпляр приложения.
static mixed __callStatic(string $method, array $args)
Обработать динамические статические вызовы объекта.
static Route get(string $uri, array|string|callable|null $action = null)
Без описания
static Route post(string $uri, array|string|callable|null $action = null)
Без описания
static Route put(string $uri, array|string|callable|null $action = null)
Без описания
static Маршрут patch(string $uri, array|string|callable|null $action = null)
Без описания
static Маршрут delete(string $uri, array|string|callable|null $action = null)
Без описания
static Маршрут options(string $uri, array|string|callable|null $action = null)
Без описания
static Маршрут any(string $uri, array|string|callable|null $action = null)
Без описания
static Маршрут fallback(array|string|callable|null $action)
Без описания
static Маршрут redirect(string $uri, string $destination, int $status = 302)
Без описания
static Маршрут permanentRedirect(string $uri, string $destination)
Без описания
static Маршрут view(string $uri, string $view, array $data = [], int|array $status = 200, array $headers = [])
Без описания
static Маршрут match(array|string $methods, string $uri, array|string|callable|null $action = null)
Без описания
static void resources(array $resources, array $options = [])
Без описания
static РегистрацияЗапрошенногоРесурса resource(string $name, string $controller, array $options = [])
Без описания
static void apiResources(array $resources, array $options = [])
Без описания
static РегистрацияЗапрошенногоРесурса apiResource(string $name, string $controller, array $options = [])
Без описания
static void singletons(array $singletons, array $options = [])
Без описания
static РегистрацияОдиночногоРесурса singleton(string $name, string $controller, array $options = [])
Без описания
static void apiSingletons(array $singletons, array $options = [])
Без описания
static PendingSingletonResourceRegistration apiSingleton(string $name, string $controller, array $options = [])
Без описания
static Router group(array $attributes, Closure|array|string $routes)
Без описания
static array mergeWithLastGroup(array $new, bool $prependExistingPrefix = true)
Без описания
static string getLastGroupPrefix()
Без описания
static Route addRoute(array|string $methods, string $uri, array|string|callable|null $action)
Без описания
static Route newRoute(array|string $methods, string $uri, mixed $action)
Без описания
static Response respondWithRoute(string $name)
Без описания
static Response dispatch(Request $request)
Без описания
static Response dispatchToRoute(Request $request)
Без описания
static array gatherRouteMiddleware(Route $route)
Без описания
static array resolveMiddleware(array $middleware, array $excluded = [])
Без описания
static Response prepareResponse(Request $request, mixed $response)
Без описания
static Response toResponse(Request $request, mixed $response)
Без описания
static void substituteImplicitBindings(Route $route)
Без описания
static Router substituteImplicitBindingsUsing(callable $callback)
Без описания
static void matched(string|callable $callback)
Без описания
static array getMiddleware()
Без описания
static Router aliasMiddleware(string $name, string $class)
Без описания
static bool hasMiddlewareGroup(string $name)
Без описания
static array getMiddlewareGroups()
Без описания
static Router middlewareGroup(string $name, array $middleware)
Без описания
static Router prependMiddlewareToGroup(string $group, string $middleware)
Без описания
static Router pushMiddlewareToGroup(string $group, string $middleware)
Без описания
static Router removeMiddlewareFromGroup(string $group, string $middleware)
Без описания
static Router flushMiddlewareGroups()
Без описания
static void bind(string $key, string|callable $binder)
Без описания
static void model(string $key, string $class, Closure|null $callback = null)
Без описания
static Closure|null getBindingCallback(string $key)
Без описания
static array getPatterns()
Без описания
static void pattern(string $key, string $pattern)
Без описания
static void patterns(array $patterns)
Без описания
static bool hasGroupStack()
Без описания
static array getGroupStack()
Без описания
static mixed input(string $key, string|null $default = null)
Без описания
static Request getCurrentRequest()
Без описания
static Route|null getCurrentRoute()
Без описания
static Route|null current()
Без описания
static bool has(string|array $name)
Без описания
static string|null currentRouteName()
Без описания
static bool is(mixed $patterns)
Без описания
static bool currentRouteNamed(mixed $patterns)
Без описания
static string|null currentRouteAction()
Без описания
static bool uses(array $patterns)
Без описания
static bool currentRouteUses(string $action)
Без описания
static void singularResourceParameters(bool $singular = true)
Без описания
static void resourceParameters(array $parameters = [])
Без описания
static array|null resourceVerbs(array $verbs = [])
Без описания
static RouteCollectionInterface getRoutes()
Без описания
static void setRoutes(RouteCollection $routes)
Без описания
static void setCompiledRoutes(array $routes)
Без описания
static array uniqueMiddleware(array $middleware)
Без описания
static void macro(string $name, object|callable $macro)
Без описания
static void mixin(object $mixin, bool $replace = true)
Без описания
static bool hasMacro(string $name)
Без описания
static void flushMacros()
Без описания
static mixed macroCall(string $method, array $parameters)
Без описания
static RouteRegistrar attribute(string $key, mixed $value)
Без описания
static RouteRegistrar whereAlpha(array|string $parameters)
Без описания
static RouteRegistrar whereAlphaNumeric(array|string $parameters)
Без описания
static RouteRegistrar whereNumber(array|string $parameters)
Без описания
static RouteRegistrar whereUlid(array|string $parameters)
Без описания
static RouteRegistrar whereUuid(array|string $parameters)
Без описания
static RouteRegistrar whereIn(array|string $parameters, array $values)
Без описания
static RouteRegistrar as(string $value)
Без описания
static RouteRegistrar controller(string $controller)
Без описания
static RouteRegistrar domain(string $value)
Без описания
static RouteRegistrar middleware(array|string|null $middleware)
Без описания
static RouteRegistrar missing(Closure $missing)
Без описания
static RouteRegistrar name(string $value)
Без описания
static RouteRegistrar namespace(string|null $value)
Без описания
static RouteRegistrar prefix(string $prefix)
Без описания
static RouteRegistrar scopeBindings()
Без описания
static RouteRegistrar where(array $where)
Без описания
static RouteRegistrar withoutMiddleware(array|string $middleware)
Без описания
static RouteRegistrar withoutScopedBindings()
Без описания
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Support/Facades/Route.html