Black Friday: coupon FRIDAY24 for 40% off Yearly/Lifetime membership! Read more here
Courses

Laravel 9 For Beginners: Your First Project

Middleware and Route Groups: Auth and Custom

avatar

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

avatar

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

avatar

Thanks a lot Sir. It worked.