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
18409894
Commit
18409894
authored
Jul 28, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more documentation to application/filters.php.
parent
554f14c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
filters.php
application/filters.php
+32
-3
No files found.
application/filters.php
View file @
18409894
...
@@ -7,9 +7,38 @@ return array(
...
@@ -7,9 +7,38 @@ return array(
| Filters
| Filters
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
|
|
| Filters provide a convenient method for filtering access to your route
| Filters provide a convenient method for attaching functionality to your
| functions. To make your life easier, we have already setup basic filters
| routes. Filters can run either before or after a route is exectued.
| for authentication and CSRF protection.
|
| The built-in "before" and "after" filters are called before and after
| every request to your application; however, you may create other filters
| that can be attached to individual routes.
|
| Filters also make common tasks such as authentication and CSRF protection
| a breeze. If a filter that runs before a route returns a response, that
| response will override the route action.
|
| Let's walk through an example...
|
| First, define a filter:
|
| 'simple_filter' => function()
| {
| return 'Filtered!';
| }
|
| Next, attach the filter to a route:
|
| 'GET /' => array('before' => 'simple_filter', 'do' => function()
| {
| return 'Hello World!';
| })
|
| Now every requests to http://example.com will return "Filtered!", since
| the filter is overriding the route action by returning a value.
|
| To make your life easier, we have built authentication and CSRF filters
| that are ready to attach to your routes. Enjoy.
|
|
| For more information, check out: http://laravel.com/docs/start/routes#filters
| For more information, check out: http://laravel.com/docs/start/routes#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