From d15c97895e240f108970e65c3587ae3669d4ce83 Mon Sep 17 00:00:00 2001 From: Jeffrey Way Date: Wed, 30 Mar 2016 13:52:09 -0400 Subject: [PATCH 1/2] Remove unnecessary 'web' middleware --- quickstart.md | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/quickstart.md b/quickstart.md index 2c7d6f94a13..e07a5f180ad 100644 --- a/quickstart.md +++ b/quickstart.md @@ -137,28 +137,25 @@ For this application, we know we will need at least three routes: a route to dis use App\Task; use Illuminate\Http\Request; - Route::group(['middleware' => 'web'], function () { - - /** - * Show Task Dashboard - */ - Route::get('/', function () { - // - }); - - /** - * Add New Task - */ - Route::post('/task', function (Request $request) { - // - }); - - /** - * Delete Task - */ - Route::delete('/task/{task}', function (Task $task) { - // - }); + /** + * Show Task Dashboard + */ + Route::get('/', function () { + // + }); + + /** + * Add New Task + */ + Route::post('/task', function (Request $request) { + // + }); + + /** + * Delete Task + */ + Route::delete('/task/{task}', function (Task $task) { + // }); > **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. From e6c74e07abf3d8ba1186c769c10bfd22a8d6a96c Mon Sep 17 00:00:00 2001 From: Jeffrey Way Date: Wed, 30 Mar 2016 13:55:37 -0400 Subject: [PATCH 2/2] Remove note about wrapping the routes --- quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstart.md b/quickstart.md index e07a5f180ad..1328902b4ed 100644 --- a/quickstart.md +++ b/quickstart.md @@ -130,7 +130,7 @@ We'll learn more about how to use Eloquent models as we add routes to our applic Next, we're ready to add a few routes to our application. Routes are used to point URLs to controllers or anonymous functions that should be executed when a user accesses a given page. By default, all Laravel routes are defined in the `app/Http/routes.php` file that is included in every new project. -For this application, we know we will need at least three routes: a route to display a list of all of our tasks, a route to add new tasks, and a route to delete existing tasks. We'll wrap all of these routes in the `web` middleware so they have session state and CSRF protection. So, let's stub all of these routes in the `app/Http/routes.php` file: +For this application, we know we will need at least three routes: a route to display a list of all of our tasks, a route to add new tasks, and a route to delete existing tasks. So, let's stub all of these routes in the `app/Http/routes.php` file: