Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Laravel - No CSRF token value? Put the Route inside of the web middleware group.

This is more of a comment then a question. I noticed that my forms _token input field did not have a value.

```<input name="_token" type="hidden">

In previous versions of Laravel, the web middleware group is assigned to routes automatically.

In version 5.2, your routes need to be manually placed there.


Locate "Application Routes" in the comments of routes.php. Add your route like this:

```/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {
        Route::resource('todos', 'TodoListController');
});