If I understood correctly, then attach Accept: application/json header to the request, after that Laravel will return a proper response for the api
Apr 13, 2023
10
Level 4
Laravel API and Web Both in one Application
i am running the web and api in the same project for the web i am usting spetie packge and for the api i am using passport package it working fine but when i run the API at that time its return the html login page in response in laravel so how can i solve that issue
Level 4
@Sergiu17 thanks for your kind help now its working for me
I have added the these 2 lines in the .htaccess file
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
Please or to participate in this conversation.