I have question and I'm can't find a solution in document
I use command
php aritsan make:controller Backend\ProductController --resource --Model=Model\Product
So, I will need route same location file controller
I use
Route::resource('/backend/product','Backend\ProductController');
after, run a command
php artisan route:list
But, I don't need this I think should be
+--------+-----------+----------------------------------+-----------------+------------------------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+-----------+----------------------------------+-----------------+------------------------------------------------------------+------------+
| | GET|HEAD | backend/product | backend.product.index | App\Http\Controllers\Backend\ProductController@index | web |
| | POST | backend/product | backend.product.store | App\Http\Controllers\Backend\ProductController@store | web |
| | GET|HEAD | backend/product/create | backend.product.create | App\Http\Controllers\Backend\ProductController@create | web |
Route name should be backend.product.index
I find a solution. but not happy.
Route::resource('/backend/user','Backend\UserController')->names([
'index' => 'backend.user.index',
'store' => 'backend.user.store',
'edit' => 'backend.user.edit',
'update' => 'backend.user.update',
'destroy' => 'backend.user.destroy',
]);
