'GET not able to find URL
I have made a basic Laravel project and had configured my api.php file to have a GET route when I want to fetch data for my project, but whenever I try to load the data on browser or perform a GET on the link (localhost:8000/data) from postman, it shows Error 404 Not Found. It seems that the GET is not able to find the URL that I had mentioned above. How can I get this issue sorted?
Solution 1:[1]
Not 100% sure this applies to you from the question. But Laravel prepends /api/ to API routes by default.
Maybe try requesting from localhost:8000/api/data?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Stefan Whittaker-Lee |
