You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create crudcontroller that extends the one from vendor
create request that extends the one from vendor
inform the developer to copy-paste some routes in his route file
This would make it much easier to overwrite the default functionality.
What would make it ever easier would be for this to be done by default, during the installation process. But it would take another 2 steps, and that's a lot. We could do this for all packages, after we build the installer. And then:
modifying some Backpack behaviour would be so much easier;
you'd have the appropriate files (controllers, models, routes) insinde your app, so you understand how it works a lot easier;
The text was updated successfully, but these errors were encountered:
I've been thinking about this because I need to modify the Page model.
I'm wondering if all of this is necessary. Why should the model, controller and request be created if I only want to modify the model (or nothing at all if it creates them by default)?
I would prefer a more general way to allow a user to extend any Backpack package and add only the files that are needed.
I'm not an expert in Laravel package development but I think this could be done by resolving the relevant classes using the IoC container although I'm not sure how to best integrate this into the CRUD package (specifically CrudPanel::setModel()).
As for the routes: I think a good way (for this and other Backpack packages) would be to use the normal CRUD::resource() method, so the process would be the same as when creating a custom CRUD interface. The problem with this is that the PageManager routes include the template name in the URL. IMHO this could be moved to a POST parameter. We could then still define the default template in a URL by adding ?template=TEMPLATE.
All this would result in some more work when installing the package (adding the routes) and when you want to modify the classes but I think it would be better especially as a default for future Backpack packages.
It would:
This would make it much easier to overwrite the default functionality.
What would make it ever easier would be for this to be done by default, during the installation process. But it would take another 2 steps, and that's a lot. We could do this for all packages, after we build the installer. And then:
The text was updated successfully, but these errors were encountered: