CRUD
CRUD copied to clipboard
[Feature Request] set `$segment` for fetchOperations
Feature Request
What's the feature you think Backpack should have?
I try to explain my situation.
Our admin panel is huge and complex and so we grouped routes. Every controller group has a prefix and a name So we have routes like users/activity/create instead of activity/create and names of users.activity.create instead of activity.create
So in un activity controller we have
CRUD::setRoute(config('backpack.base.route_prefix') . 'users/activity');
But when we use fetchOperations, we loose the name.
we have users/activity/fetch/students
named only as activity.fetchStudents
The problem is: we have also an ActivityController under manager
(name and prefix).
In this 2nd controller, in a different folder and namespace, we CANNOT have another specific fetchStudents
function because this will always create a route named activity.fetchStudents
So i think that
- setupFetchOperation should take in care what setRoute has already setup instead of using only singular entity name as segment
- a documented way to workarounde this
Have you already implemented a prototype solution, for your own project?
I actually workaround overriding setupFetchOperationRoutes
Do you see this as a core feature or an add-on?
fetch it's already part of pro addon