Are there PHP tools to generate CRUD screens from DB schema?

Eric picture Eric · Apr 12, 2011 · Viewed 10.6k times · Source

I've been using phpMyEdit to quickly generate CRUD screens for databases; it's a quick way to start interacting with data in my projects (and lets me toss together internal admin pages fast)... but it doesn't read the DB schema, so I have to manually set it up.

I'm looking for a tool/way to quickly generate CRUD from beginning to end: I give it a DB table, and it reads the schema, generates the HTML markup for the form, and does the CRUD work on the db itself.

Does this exist? My goal is to have zero setup for basic functionality, and then I'd love the option of being able to extend that basic setup to further refine the experience. (For example: if it can see my database table has four varchar() fields, that would be ready to go with four editing fields "out of the box," but then I'd like to be able to add a little bit of code/set some flags to specify the one varchar() column that is meant to hold an email address, so the tool would then do data validation to only allow emails in that field.)

UPDATE: I'm seeking a solution that I can drop into my existing PHP project(s) -- not an entire framework.

Answer

k to the z picture k to the z · Apr 12, 2011

The Yii Framework Does this out of the box. You use a web gui to plug in the database table name and it generates crud screens and active record classes along with all the models, views, and controllers.