abstract
File
routingcontroller.php
Package
Default
Class hierarchy
LaravelRoutingController

Tags

None found

Constants

factory

factory

The event name for the Laravel controller factory.

Tags

None found

Properties

$layout

$layout : string

The layout being used by the controller.

Type

string

Tags

None found

$bundle

$bundle : string

The bundle the controller belongs to.

Type

string

Tags

None found

$restful

$restful : boolean

Indicates if the controller uses RESTful routing.

Type

boolean

Tags

None found

$filters

$filters : array

The filters assigned to the controller.

Type

array

Tags

None found

Methods

__construct()

__construct() : void

Create a new Controller instance.

Tags

None found

detect()

detect(string  $bundle = DEFAULT_BUNDLE, string  $directory = null) : array

Detect all of the controllers for a given bundle.

Parameters

string $bundle
string $directory

Returns

array

static

Tags

None found

call()

call(string  $destination, array  $parameters = array()) : \Response

Call an action method on a controller.

// Call the "show" method on the "user" controller $response = Controller::call('user@show');

// Call the "user/admin" controller and pass parameters
$response = Controller::call('user.admin@profile', array($username));

Parameters

string $destination
array $parameters

Returns

Response

static

Tags

None found

resolve()

resolve(string  $bundle, string  $controller) : \Laravel\Routing\Controller

Resolve a bundle and controller name to a controller instance.

Parameters

string $bundle
string $controller

Returns

LaravelRoutingController

static

Tags

None found

execute()

execute(string  $method, array  $parameters = array()) : \Response

Execute a controller method with the given parameters.

Parameters

string $method
array $parameters

Returns

Response

Tags

None found

response()

response(string  $method, array  $parameters = array()) : mixed

Execute a controller action and return the response.

Unlike the "execute" method, no filters will be run and the response from the controller action will not be changed in any way before it is returned to the consumer.

Parameters

string $method
array $parameters

Returns

mixed

Tags

None found

layout()

layout() : \Laravel\View

Create the layout that is assigned to the controller.

Returns

LaravelView

Tags

None found

before()

before() : void

This function is called before the action is executed.

Tags

None found

after()

after(\Response  $response) : void

This function is called after the action is executed.

Parameters

Response $response

Tags

None found

__call()

__call(  $method,   $parameters) 

Magic Method to handle calls to undefined controller functions.

Parameters

$method
$parameters

Tags

None found

__get()

__get(  $key) 

Dynamically resolve items from the application IoC container.

// Retrieve an object registered in the container $mailer = $this->mailer;

// Equivalent call using the IoC container instance
$mailer = IoC::resolve('mailer');

Parameters

$key

Tags

None found

references()

references(string  $destination, array  $parameters) : array

Replace all back-references on the given destination.

Parameters

string $destination
array $parameters

Returns

array

static

Tags

None found

load()

load(string  $bundle, string  $controller) : boolean

Load the file for a given controller.

Parameters

string $bundle
string $controller

Returns

boolean

static

Tags

None found

format()

format(string  $bundle, string  $controller) : string

Format a bundle and controller identifier into the controller's class name.

Parameters

string $bundle
string $controller

Returns

string

static

Tags

None found

filter()

filter(string  $event, string|array  $filters, mixed  $parameters = null) : \Laravel\Routing\Filter_Collection

Register filters on the controller's methods.

// Set a "foo" after filter on the controller $this->filter('before', 'foo');

// Set several filters on an explicit group of methods
$this->filter('after', 'foo|bar')->only(array('user', 'profile'));

Parameters

string $event
string|array $filters
mixed $parameters

Returns

LaravelRoutingFilter_Collection

Tags

None found

filters()

filters(string  $event, string  $method) : array

Get an array of filter names defined for the destination.

Parameters

string $event
string $method

Returns

array

Tags

None found