App\Http\Middleware\VerifyCsrfToken
обработать наш путь.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
class VerifyCsrfToken extends BaseVerifier {
private $skipRoute = 'api/*';
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next) {
if ($request->is($this->skipRoute)) {
return $next($request);
}
return parent::handle($request, $next);
}
}