Answer the question
In order to leave comments, you need to log in
How to correctly send _token via POSTMAN to server?
I send data to the server, but it gives an error TokenMismatchException Disable the
token:
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
// \App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
array:2 [
"_token" => "jBIy2c0Gsk7zjNbs8RW0uB61tkSPlXGVdIXLr6Xy"
"another_value" => "True"
]
Answer the question
In order to leave comments, you need to log in
In App\Http\Middleware\VerifyCsrfToken write:
protected $except = [
'api/*'
];
https://laravel.com/docs/5.4/csrf
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question