Which Laravel version are you using?
Laravel now supports HTTP OPTIONS verb, so I think you don't need to handle it in your .htaccess.
However, if you're using Route::resource()
, it doesn't automatically add an options action afaik, so you may need to add it manually with Route::options()
.
My laravel-cors library tries to handle this: https://github.com/barryvdh/laravel-cors You can also try this generic middleware https://github.com/asm89/stack-cors
Hi,
I'm trying to do an API REST with Laravel using the OPTIONS verb and I was wondering for documentation? Which tool do you use? Is it possible to auto-discover the API thanks to the OPTIONS verb?
Thanks
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community