Skip to content

Commit

Permalink
clarifying docs
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 23, 2016
1 parent 5731062 commit f0f698a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ Middleware groups may be assigned to routes and controller actions using the sam
//
});

Keep in mind, the `web` middleware group is automatically applied to your default `routes.php` file by the `RouteServiceProvider`.

<a name="middleware-parameters"></a>
## Middleware Parameters

Expand Down
1 change: 1 addition & 0 deletions quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ For this application, we know we will need at least three routes: a route to dis
});
});

> **Note**: If your copy of Laravel has a `RouteServiceProvider` that already includes the default routes file within the `web` middleware group, you do not need to manually add the group to your `routes.php` file.
<a name="displaying-a-view"></a>
### Displaying A View
Expand Down
2 changes: 2 additions & 0 deletions releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ Then, the `web` group may be assigned to routes like so:
//
});

However, keep in mind the `web` middleware group is *already* applied to your routes by default since the `RouteServiceProvider` includes it in the default middleware group.

### Rate Limiting

A new rate limiter middleware is now included with the framework, allowing you to easily limit the number of requests that a given IP address can make to a route over a specified number of minutes. For example, to limit a route to 60 requests every minute from a single IP address, you may do the following:
Expand Down
8 changes: 1 addition & 7 deletions routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,7 @@ All Laravel routes are defined in the `app/Http/routes.php` file, which is autom

#### The Default Routes File

By default, the `routes.php` file contains a single route as well as a [route group](#route-groups) that applies the `web` middleware group to all routes it contains. This middleware group provides session state and CSRF protection to routes.

Any routes not placed within the `web` middleware group will not have access to sessions and CSRF protection, so make sure any routes that need these features are placed within the group. Typically, you will place most of your routes within this group:

Route::group(['middleware' => ['web']], function () {
//
});
The default `routes.php` file is loaded by the `RouteServiceProvider` and is automatically included in the `web` middleware group, which provides access to session state and CSRF protection. Most of the routes for your application will be defined within this file.

#### Available Router Methods

Expand Down

0 comments on commit f0f698a

Please sign in to comment.