API Route Not Showing in route:list
Asked Answered
N

1

5

I made Route in my routes->api, but when I do php artisan route:list, it shows me all routes except this route:

Route::apiResources([
    'vh-invoice' => 'API\VhInvoiceController'
]);

Even when I remove some routes its shows me the same route:list, like I, removed these routes below, but in route:list it shows me the removed routes also, as you can see in the image below.

Route::get('findVTI', 'API\TicketInvoiceController@searchVTI');
Route::get('selectVTI', 'API\TicketInvoiceController@selectVTI');

enter image description here

Naxos answered 1/12, 2018 at 14:28 Comment(4)
You may have your routes cached and need to clear the cache. laravel.com/docs/5.7/controllers#route-cachingAdvisedly
also did that but same....Naxos
@Advisedly yeah it's done i forgot to do route:cacheNaxos
raise that as an answer pleaseNaxos
A
23

You may have your routes cached and need to clear the cache. You can run php artisan route:cache to refresh the cache.

Advisedly answered 1/12, 2018 at 14:49 Comment(1)
This was my problem. For some reason, my routes were suddenly cached and Laravel didn't recognize a new route I added. Weird.Myxoma

© 2022 - 2024 — McMap. All rights reserved.