Git Product home page Git Product logo

Comments (2)

tricki avatar tricki commented on July 2, 2024

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.

from pagemanager.

unstoppablecarl avatar unstoppablecarl commented on July 2, 2024

It doesn't need all this, it just needs a config file that lets you set the model/ controller, and a more easily extended service provider.

from pagemanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.