I am currently doing your laravel routing skills tasks and I passed all the test for the web routes but I am having difficulties with the api routes. The url works but I get a 404 error upon visiting the page. I get a response of 1 failed and 7 passed when I run php artisan test.
Here is a screenshot of my code and the error: https://prnt.sc/T_MhWC3QNaF6
Prefix should be only v1 in the routes file, cause prefix api comes automatically if you put the routes in routes/api.php file, it is described in RouteServiceProvider.php
I am currently doing your laravel routing skills tasks and I passed all the test for the web routes but I am having difficulties with the api routes. The url works but I get a 404 error upon visiting the page. I get a response of 1 failed and 7 passed when I run php artisan test. Here is a screenshot of my code and the error: https://prnt.sc/T_MhWC3QNaF6
Prefix should be only
v1
in the routes file, cause prefixapi
comes automatically if you put the routes inroutes/api.php
file, it is described inRouteServiceProvider.php
Thanks a lot Sir. It worked.