Hi @mecjos if you are using resource in your route and you already connect with the controller like PHP artisan make: model Test -mcr like this one then you don't have to put a specific name in there you have to just watch your rout list and you can find that there is already a name with the resource controller.
Sep 16, 2022
4
Level 2
Naming Api Resources Routes
Hi. Is there a way to name api resources routes.. for example:
Route::prefix('admin')->middleware('auth:admin')->group(function () {
Route::apiResources([
'/users' => 'Admin\UserController', => how to name this? *******
'/plans' => 'Admin\PlanController' => how to name this ? ***********
]);
});
I want to do that because I have another controller with same name in root controller namespace.. Thus I get serialization error while executing route:cache artisan command.
Thank you.
Please or to participate in this conversation.