Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
8d3327da
Commit
8d3327da
authored
Nov 08, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ditched filter shortcuts
parent
3833e12c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
36 deletions
+4
-36
controller.php
laravel/routing/controller.php
+4
-36
No files found.
laravel/routing/controller.php
View file @
8d3327da
...
...
@@ -137,55 +137,23 @@ abstract class Controller {
}
/**
* Set
"after"
filters on the controller's methods.
* Set filters on the controller's methods.
*
* Generally, this method will be used in the controller's constructor.
*
* <code>
* // Set a "foo" before filter on the controller
* $this->
before_filter(
'foo');
* $this->
filter('before',
'foo');
*
* // Set several filters on an explicit group of methods
* $this->
before_filter(
'foo|bar')->only(array('user', 'profile'));
* $this->
filter('after',
'foo|bar')->only(array('user', 'profile'));
* </code>
*
* @param string|array $filters
* @return Filter_Collection
*/
public
function
before_filter
(
$filters
)
{
return
$this
->
filter
(
'before'
,
$filters
);
}
/**
* Set "after" filters on the controller's methods.
*
* Generally, this method will be used in the controller's constructor.
*
* <code>
* // Set a "foo" after filter on the controller
* $this->after_filter('foo');
*
* // Set several filters on an explicit group of methods
* $this->after_filter('foo|bar')->only(array('user', 'profile'));
* </code>
*
* @param string|array $filters
* @return Filter_Collection
*/
public
function
after_filter
(
$filters
)
{
return
$this
->
filter
(
'after'
,
$filters
);
}
/**
* Set filters on the controller's methods.
*
* @param string $name
* @param string|array $filters
* @return Filter_Collection
*/
p
rotected
function
filter
(
$name
,
$filters
)
p
ublic
function
filter
(
$name
,
$filters
)
{
$this
->
filters
[]
=
new
Filter_Collection
(
$name
,
$filters
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment