I am trying to pass category id along with reorder route so I can list article based on the category. How can I overwrite reorder route like this
Route::get($segment.'/{id}/reorder', [
'as' => $routeName.'.reorder',
'uses' => $controller.'@reorder',
'operation' => 'reorder',
]);
Route::post($segment.'/{id}/reorder', [
'as' => $routeName.'.save.reorder',
'uses' => $controller.'@saveReorder',
'operation' => 'reorder',
]);
2
Answers
your routes should look like this,
and Post Route,
and then in the methods you will accept that parameters like For Example,
To order articles in each category you have to create a nested CRUD.
Here is a similar article to create one, which displays articles from a particular category:
https://backpackforlaravel.com/articles/tutorials/nested-resources-in-backpack-crud
CategoryArticleCrudController
.I hope this helps.