【问题标题】:API Route Not Showing in route:listAPI 路由未显示在路由:列表中
【发布时间】:2019-05-03 10:45:53
【问题描述】:

我在我的 routes->api 中创建了 Route,但是当我执行 php artisan route:list 时,它会显示除这条路线之外的所有路线:

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

即使我删除了一些路线,它也会向我显示相同的路线:列表,就像我一样,在下面删除了这些路线,但在路线:列表中,它也会向我显示删除的路线,如下图所示。

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

【问题讨论】:

标签: laravel routes laravel-routing laravel-5.7


【解决方案1】:

您的路线可能已缓存,需要清除缓存。你可以运行php artisan route:cache来刷新缓存。

【讨论】:

    猜你喜欢
    • 2022-11-10
    • 1970-01-01
    • 2019-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-20
    • 2020-07-10
    相关资源
    最近更新 更多