【发布时间】:2021-07-31 16:11:48
【问题描述】:
我正在使用apiResource 和其他路线。我将它们分组如下:
Route::group(['prefix' => 'posts'], function () {
Route::group(['prefix' => '/{post}'], function () {
Route::put('lablabla', [PostController::class, 'lablabla']);
});
Route::apiResource('/', PostController::class, [
'names' => [
'store' => 'create_post',
'update' => 'edit_post',
]
]);
});
除了index 和store 之外的所有apiResource 路由都不起作用!我应该如何对路线进行分组?
【问题讨论】: