File
routing outer.php
Package
Default
Class hierarchy
LaravelRoutingRouter

Tags

None found

Properties

$names

$names : array

The route names that have been matched.

Type

array

Tags

None found

$uses

$uses : array

The actions that have been reverse routed.

Type

array

Tags

None found

$routes

$routes : array

All of the routes that have been registered.

Type

array

Tags

None found

$fallback

$fallback : array

All of the "fallback" routes that have been registered.

Type

array

Tags

None found

$group

$group : 

The current attributes being shared by routes.

Type

Tags

None found

$bundle

$bundle : string

The "handles" clause for the bundle currently being routed.

Type

string

Tags

None found

$segments

$segments : integer

The number of URI segments allowed as method arguments.

Type

integer

Tags

None found

$patterns

$patterns : array

The wildcard patterns supported by the router.

Type

array

Tags

None found

$optional

$optional : array

The optional wildcard patterns supported by the router.

Type

array

Tags

None found

$methods

$methods : array

An array of HTTP request methods.

Type

array

Tags

None found

Methods

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

share()

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

Register many request URIs to a single action.

// Register a group of URIs for an action Router::share(array(array('GET', '/'), array('POST', '/')), 'home@index');

Parameters

array $routes
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

register()

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

Register a route with the router.

// Register a route with the router Router::register('GET', '/', function() {return 'Home!';});

// Register a route that handles multiple URIs with the router
Router::register(array('GET', '/', 'GET /home'), function() {return 'Home!';});

Parameters

string $method
string|array $route
mixed $action

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

controller()

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

Register a controller with the router.

Parameters

string|array $controllers
string|array $defaults
boolean $https

static

Tags

None found

find()

find(string  $name) : array

Find a route by the route's assigned name.

Parameters

string $name

Returns

array

static

Tags

None found

uses()

uses(string  $action) : array

Find the route that uses the given action.

Parameters

string $action

Returns

array

static

Tags

None found

route()

route(string  $method, string  $uri) : \Laravel\Routing\Route

Search the routes for the route matching a method and URI.

Parameters

string $method
string $uri

Returns

LaravelRoutingRoute

static

Tags

None found

routes()

routes() : array

Get all of the registered routes, with fallbacks at the end.

Returns

array

static

Tags

None found

method()

method(string  $method) : array

Grab all of the routes for a given request method.

Parameters

string $method

Returns

array

static

Tags

None found

patterns()

patterns() : array

Get all of the wildcard patterns

Returns

array

static

Tags

None found

action()

action(mixed  $action) : array

Convert a route action to a valid action array.

Parameters

mixed $action

Returns

array

static

Tags

None found

root()

root(string  $identifier, string  $controller, string  $root) : void

Register a route for the root of a controller.

Parameters

string $identifier
string $controller
string $root

static

Tags

None found

match()

match(string  $method, string  $uri) : \Laravel\Routing\Route

Iterate through every route to find a matching route.

Parameters

string $method
string $uri

Returns

LaravelRoutingRoute

static

Tags

None found

wildcards()

wildcards(string  $key) : string

Translate route URI wildcards into regular expressions.

Parameters

string $key

Returns

string

static

Tags

None found

repeat()

repeat(string  $pattern, integer  $times) : string

Get a string repeating a URI pattern any number of times.

Parameters

string $pattern
integer $times

Returns

string

static

Tags

None found