Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3.19k stars 898 forks source link

Developer Experience: utility method/function to get supported crud fields. https://laravel-backpack.readme.io/docs/crud-fields #1194

Closed chriscalip closed 6 years ago

chriscalip commented 6 years ago

Who wants it? Can we have it?

Developers using/extending backpack could use this utility function/method.

tabacitu commented 6 years ago

Hmm... I'm not sure I understand. What do you mean @chriscalip ? Could you please give me a few details about the implementation, so I can understand?

Thanks, cheers!

chriscalip commented 6 years ago

@tabacitu I started to use backpack and explore its uses that it was originally intended. For example imagine a situation for a crud gui where an administrator gets to build forms by point-and-click. I goto a newly created model then "Manage Attributes" and for each attribute pick a corresponding crud field.

Now imagine a model, Profile, with relation 1:N relation with model, Questions, and on each question; an administrator can manage its crud field type like "select-from-array" and manage the allowed-values.

profile-screenshot

Now on a different model, Asset, depending on picked mapper I get Profile Questions on Asset CRUD.

asset-profile-screenshot

Having a utility function/method makes it easier for this crud extension to be aware of the available crud fields.. instead of just manually list.

tabacitu commented 6 years ago

Oh, I get now, thanks. Yes, a GUI for creating CRUDs is planned, but we're quite a while from that. We're currently focused on delivering the best UX possible in code. Only after we're happy with that, will we start building the GUI. This polishing phase should take another few months, imho. As an intermediary step, which will be coming sooner than the GUI, we're building better generators, which will automatically generate full models, requests and controllers. No need to code for most simple CRUDs, if you setup the database structure right. After that, it's just a matter of creating a point-and-click interface for those generators.

Hope this clears up the roadmap a little bit. Cheers!