how to excluse csrf in a route laravel

87

// go to App\Http\Middleware\verifyCsrfToken.php and add the route into except array

<?php namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;

class VerifyCsrfToken extends BaseVerifier
{
  protected $except = [
    '/payment',
  ];
}

Comments

Submit
0 Comments