LaravelRoutingFilter_Collection

Summary

No protected properties found
N/A
No private methods found
No private properties found
N/A
File
routingilter.php
Package
Default
Class hierarchy
LaravelRoutingFilter_Collection

Tags

None found

Properties

$filters

$filters : string|array

The filters contained by the collection.

Type

string|array

Tags

None found

$parameters

$parameters : mixed

The parameters specified for the filter.

Type

mixed

Tags

None found

$only

$only : array

The included controller methods.

Type

array

Tags

None found

$except

$except : array

The excluded controller methods.

Type

array

Tags

None found

$methods

$methods : array

The HTTP methods for which the filter applies.

Type

array

Tags

None found

Methods

__construct()

__construct(string|array  $filters, mixed  $parameters = null) : void

Create a new filter collection instance.

Parameters

string|array $filters
mixed $parameters

Tags

None found

get()

get(string  $filter) : array

Parse the filter string, returning the filter name and parameters.

Parameters

string $filter

Returns

array

Tags

None found

applies()

applies(string  $method) : boolean

Determine if this collection's filters apply to a given method.

Parameters

string $method

Returns

boolean

Tags

None found

except()

except(array  $methods) : \Laravel\Routing\Filter_Collection

Set the excluded controller methods.

// Specify a filter for all methods except "index" $this->filter('before', 'auth')->except('index');

// Specify a filter for all methods except "index" and "home"
$this->filter('before', 'auth')->except(array('index', 'home'));

Parameters

array $methods

Returns

LaravelRoutingFilter_Collection

Tags

None found

only()

only(array  $methods) : \Laravel\Routing\Filter_Collection

Set the included controller methods.

// Specify a filter for only the "index" method $this->filter('before', 'auth')->only('index');

// Specify a filter for only the "index" and "home" methods
$this->filter('before', 'auth')->only(array('index', 'home'));

Parameters

array $methods

Returns

LaravelRoutingFilter_Collection

Tags

None found

on()

on(array  $methods) : \Laravel\Routing\Filter_Collection

Set the HTTP methods for which the filter applies.

// Specify that a filter only applies on POST requests $this->filter('before', 'csrf')->on('post');

// Specify that a filter applies for multiple HTTP request methods
$this->filter('before', 'csrf')->on(array('post', 'put'));

Parameters

array $methods

Returns

LaravelRoutingFilter_Collection

Tags

None found

parameters()

parameters() : array

Evaluate the collection's parameters and return a parameters array.

Returns

array

Tags

None found