Skip to main content

Middleware and Route Groups: Auth and Custom

Lesson 12/15 5:55
Autoplay

Comments & Discussion

O
oluchristian ✓ Link copied!

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

PK
Povilas Korop ✓ Link copied!

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

O
oluchristian ✓ Link copied!

Thanks a lot Sir. It worked.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.