Custom Middleware
Created 4 years ago by josefpreeo

My final objective is to create a POST route that doesn't require the csrftoken check. I created a route with the reference to a custom Middleware: 'checkout/ipn' => [ 'uses' => 'Preeo\CustomPageHandlerExtension\Http\Controller\CheckoutController@ipn', 'verb' => 'post', 'middleware' => 'Preeo\LearningSystemModule\Http\Middleware\VerifyCsrfToken' ] and the Middleware extends Anomaly\Streams\Platform\Http\Middleware\VerifyCsrfToken and has the following code: class VerifyCsrfToken extends BaseVerifier { /** * The URIs that should be excluded from CSRF verification. * * @var array */ protected $except = [ 'checkout/ipn/*' ]; } Unfortunately this is still not working though - any help?

ryanthompson  —  4 years ago

You can also add "csrf" => false to the route