Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Miko55's avatar

Laravel - php artisan serve API problem

I deploy my site with php artisan serve and I have a login form in Vue. So I use axios to make an API call. Instead of GET request I get OPTIONS method. Why is this happening ?

0 likes
2 replies
thedejavunl's avatar

Hi @Miko55,

Can you show us the JavaScript code that you use to send the axios request to your server?

Miko55's avatar

I solved it, it was problem with CORS

Please or to participate in this conversation.