File
routing oute.php
Package
Default
Class hierarchy
LaravelRoutingRoute

Tags

None found

Properties

$uri

$uri : string

The URI the route responds to.

Type

string

Tags

None found

$method

$method : string

The request method the route responds to.

Type

string

Tags

None found

$bundle

$bundle : string

The bundle in which the route was registered.

Type

string

Tags

None found

$controller

$controller : string

The name of the controller used by the route.

Type

string

Tags

None found

$controller_action

$controller_action : string

The name of the controller action used by the route.

Type

string

Tags

None found

$action

$action : mixed

The action that is assigned to the route.

Type

mixed

Tags

None found

$parameters

$parameters : array

The parameters that will be passed to the route callback.

Type

array

Tags

None found

Methods

__construct()

__construct(string  $method, string  $uri, array  $action, array  $parameters = array()) 

Create a new Route instance.

Parameters

string $method
string $uri
array $action
array $parameters

Tags

None found

call()

call() : \Response

Call a given route and return the route's response.

Returns

Response

Tags

None found

response()

response() : mixed

Execute the route action and return the response.

Unlike the "call" method, none of the attached filters will be run.

Returns

mixed

Tags

None found

is()

is(string  $name) : boolean

Determine if the route has a given name.

// Determine if the route is the "login" route $login = Request::route()->is('login');

Parameters

string $name

Returns

boolean

Tags

None found

controller()

controller(string|array  $controllers, string|array  $defaults = 'index') : void

Register a controller with the router.

Parameters

string|array $controllers
string|array $defaults

static

Tags

None found

secure_controller()

secure_controller(string|array  $controllers, string|array  $defaults = 'index') : void

Register a secure controller with the router.

Parameters

string|array $controllers
string|array $defaults

static

Tags

None found

get()

get(string|array  $route, mixed  $action) : void

Register a GET route with the router.

Parameters

string|array $route
mixed $action

static

Tags

None found

post()

post(string|array  $route, mixed  $action) : void

Register a POST route with the router.

Parameters

string|array $route
mixed $action

static

Tags

None found

put()

put(string|array  $route, mixed  $action) : void

Register a PUT route with the router.

Parameters

string|array $route
mixed $action

static

Tags

None found

patch()

patch(string|array  $route, mixed  $action) : void

Register a PATCH route with the router.

Parameters

string|array $route
mixed $action

static

Tags

None found

delete()

delete(string|array  $route, mixed  $action) : void

Register a DELETE route with the router.

Parameters

string|array $route
mixed $action

static

Tags

None found

any()

any(string|array  $route, mixed  $action) : void

Register a route that handles any request method.

Parameters

string|array $route
mixed $action

static

Tags

None found

group()

group(array  $attributes, \Closure  $callback) : void

Register a group of routes that share attributes.

Parameters

array $attributes
Closure $callback

static

Tags

None found

share()

share(array  $routes, mixed  $action) : void

Register many request URIs to a single action.

Parameters

array $routes
mixed $action

static

Tags

None found

secure()

secure(string  $method, string|array  $route, mixed  $action) : void

Register a HTTPS route with the router.

Parameters

string $method
string|array $route
mixed $action

static

Tags

None found

filter()

filter(string  $name, mixed  $callback) : void

Register a route filter.

Parameters

string $name
mixed $callback

static

Tags

None found

forward()

forward(string  $method, string  $uri) : \Response

Calls the specified route and returns its response.

Parameters

string $method
string $uri

Returns

Response

static

Tags

None found

parameters()

parameters(array  $action, array  $parameters) : void

Set the parameters array to the correct value.

Parameters

array $action
array $parameters

Tags

None found

filters()

filters(string  $event) : array

Get the filters that are attached to the route for a given event.

Parameters

string $event

Returns

array

Tags

None found

patterns()

patterns() : array

Get the pattern filters for the route.

Returns

array

Tags

None found

delegate()

delegate() : string

Get the controller action delegate assigned to the route.

If no delegate is assigned, null will be returned by the method.

Returns

string

Tags

None found

handler()

handler() : \Closure

Get the anonymous function assigned to handle the route.

Returns

Closure

Tags

None found