vendredi 16 octobre 2015

Is there a way to exclude a route from CSRF protection from within a package in Laravel 5?

I am aware of the $except property of the VerifyCsrfToken middleware (app/Http/Middleware/VerifyCsrfToken.php) but I am looking for a way to do something similar from my package (so the users who install it don't have to modify their VerifyCsrfToken.php for my route to work).

I am able to define routes on my package but I have no idea how to exclude one (or more) of them from the default middleware. I have tried extending Illuminate\Foundation\Http\Middleware\VerifyCsrfToken on my own package with no luck.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire