@mdeclaire That is certainly the easiest technique. But do be aware, that App\Http\Middleware\VerifyCsrfToken lists the URLs that are excluded, not the routes. It uses the $request->is() method internally, so includes whatever wildcards that supports.

Personally, I don't like mixing route names and URL fragments all over the place. The controllers should not have to know what the URL formats are (laravel out of the box puts url paths in several places, which all need to be found and replaced with route names). Anyway, sorry to rant :-)

Return to Thread...