How to authorize request using laravel breeze?

381 Views Asked by At

I have installed laravel breeze with sail, and I'm trying to make axios request, like

axios.get('/api/messages');

But I got an error

{"message":"Unauthenticated."}

I am authorized, and can open pages like "dashboard".
I added

axios.defaults.withCredentials = true;

to my "bootstrap.js" but it didn't help.

0

There are 0 best solutions below