I thought the same, so I created the laravel scaffold command to do all that you need. Just type the command:
php artisan scaffold
And the guided setup will help you with the rest. An example of the sexiness:
Amazon\Book belongsTo Author, hasMany Page string ( title description publisher ) published:datetime
That will namespace your application, set up the relations on your models, and include the relationships on your migrations and create "fake" seed data using Faker.
Check it out: on Github
Tip of the hat, good sir, a tip of the hat to you. I have already scaffolded a bunch of stuff together with Jeffrey Way's Generator, but this goes further.
There could be other things like form generators that have autocomplete searches for fields, or re-orderable tables, or a set of conventions for Sentry user group permissions being turned into filters for each controller, but then there'd be nothing left for developers to develop, and unemployment would rise.
Hahaha... that's what they were saying back in the '60s when computers were first coming out... or back when industrial farming was beginning... but the world just keeps on moving on :)
I'm going to clean up the code and offer the ability to use templates (I should have done this originally but my original intent was to make it for myself ;)). Once I get that squared away then I'd like to keep on pushing it further and am definitely open for suggestions.
An idea ... but would be nice that it would work with workbench mwb files. Or a similar system where you don't have to type out each model command prompt. Or ... have a way that you can do something like migrations.
Yes that is another idea I had... just feed it a file with everything defined already. I actually am building a file like that for my next project, so I may implement it soon :)
It would be super ridiculously amazing if it could convert a sql file, but that would take some work.
+1 to scaffolding based on mwb, sql create files, or database schema. Personally, I think database schema would be the most flexible to use, as you can create that with whatever tools you are accustomed to.
Sign in to participate in this thread!