Category : x-xsrf-token

I have problem with laravel sanctum usage in Angular SPA application. Acutal documentation for laravel 8.x says: If the login request is successful, you will be authenticated and subsequent requests to your application’s routes will automatically be authenticated via the session cookie that the Laravel application issued to your client. In addition, since your application ..

Read more

There is an example for axios in the documentation. But that’s not what I want. I need to get XSRF-TOKEN exactly from the php code. My code: namespace AppHttpControllers; use IlluminateHttpRequest; use IlluminateSupportFacadesAuth; use GuzzleHttpClient; require ‘../vendor/autoload.php’; class LoginController extends Controller { public function index(){ $client = new Client([ ‘base_uri’ => ‘http://myshop.localhost’, ‘cookies’ => true ..

Read more