0

I have the csrf which it's already attached to the axios header at bootstap.js, I get always this response from server when try to post simple post (they are three pictures below explaining my situation)

axios post from vue file:
axios post from vue file

Route at web.php:
Route at web.php

result 1:
result 1

result 2:
result 2

Nimantha
  • 5,793
  • 5
  • 23
  • 56
K.33s
  • 51
  • 1
  • 8

1 Answers1

2

Try this, it works for me so far but you'll be without CSRF, go to 'App\Http\Middleware\VerifyCsrfToken' then edit the protected variable to this

 protected $except = [
     "/*"
 ];

the '/*' says to exclude CSRF from all routes, although this isn't ideal it should fix the problem, Maybe just exclude those specific routes that are throwing you the error?

e.g. "/specificRoute"

Kenziiee Flavius
  • 1,849
  • 4
  • 24
  • 56