Answers for "laravel api thorow cors error"

PHP
1

laravel api enable cors

//I always use an easy method. Just add below lines to publicindex.php file.
//You don't have to use a middleware I think.

header('Access-Control-Allow-Origin: *');  
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
Posted by: Guest on September-15-2021

Browse Popular Code Answers by Language