Bypassing Laravel’s CSRF Middleware on selected routes (from 5.1)

A handy way to have some of your routes skip the middleware for CSRF protection. Handy in some situations.

Laravel does a great job at protecting us from cross-site request forgeries – or C.S.R.F. for short.But sometimes you may not wish to have that layer present. Well with Laravel 5.1 you can very easily bypass this middleware, simply by populating an array in the following file:

app/Http/Middleware/VerifyCsrfToken.php

Within this class you can add a protected property — an array — called $except, which will tell Laravel to use this middleware except for the ones you specify here.

A complete example could be:

protected $except = [
    'ignore/this/url',
    'this/one/too',
    'and/this',
];

So for those three URLs, the CSRF middleware would be skipped.

100 Albums #2 – The Wall: Live in Berlin by Roger Waters (and various artists)

A couple of weeks ago I went to see the one-night-only showing of Roger Waters’ The Wall at my local cinema. That performance rekindled my love for that album – indeed Pink Floyd in general.

Yesterday I revisted an older performance of the album, which was given at the Berlin wall at the time when it was being torn down.

Very apt.

This performance of The Wall is unique, in that many of the songs are performed by guest artists. My personal favorites of these perfomances are Bryan Adam’s “Young Lust”, Paul Carrack’s “Hey You” and Van Morrison’s “Comfortably Numb”.

For any fans of The Wall, this album is a milestone performance and must be experienced.