I find a solution for my problem, I was trying to fetch data from http://localhost:8000/api and when I checked cors.php file I find the paths key contains 2 values like the following:
'paths' => ['api/*', 'sanctum/csrf-cookie']
so like I said I was navigating to api path not api/* only so the array should contain a value of the 'api' like the following:
'paths' => ['api/*', 'sanctum/csrf-cookie', 'api']
0 comments:
Post a Comment
Thanks