Series This post is in a series on New Features in Laravel 5.1.

Excluding Routes from the CSRF Middleware in Laravel 5.1

Posted on July 07, 2015

!
Warning: This post is over a year old. I don't always update old posts with new information, so some of this information may be out of date.

Whoops! I missed a feature from my Laravel 5.1 review!

It's now super easy to exclude specific routes from your CSRF middleware:

// app/Http/Middleware/VerifyCsrfToken
protected $except = [
 'webhook/*'
];

Learn more about how, and why, it works at Laravel News': Excluding Routes from the CSRF Middleware.


Comments? I'm @stauffermatt on Twitter


Tags: laravel  •  laravel 5.1


This is part of a series of posts on New Features in Laravel 5.1:

  1. Jun 9, 2015 | laravel, laravel 5.1
  2. Jun 15, 2015 | laravel, laravel 5.1, testing, integration testing
  3. Jun 16, 2015 | laravel, laravel 5.1, testing, integration testing
  4. Jul 31, 2015 | laravel, laravel 5.1
  5. Sep 9, 2015 | acl, laravel, laravel 5.1, authorization

Subscribe

For quick links to fresh content, and more thoughts that don't make it to the blog