Home > Net >  Im using laravel as an api, but I cannot load my routes, I got always 404 error in the browser or po
Im using laravel as an api, but I cannot load my routes, I got always 404 error in the browser or po

Time:04-05

I'm using laravel, and I've wrote some routes but I cannot load them I dunno why? I'm using laravel 7, and also postman. I'm using postman to test the routes.

I've wrote this in the routes directory and web.php file

I also don't know whether I need to write the route in api.php because I wrote them in web.php

CodePudding user response:

You don't need to do it just you can use the Routes which is in WEB.PHP like this example:

Route::get('/home', [HomeController::class, 'index'])->name('home');

CodePudding user response:

What is the output of artisan route:list?

  • Related