InfyOmLabs / laravel-generator

API and Admin Panel CRUD Generator for Laravel.
https://www.infyom.com/open-source
MIT License
3.79k stars 813 forks source link

Save to schema file from exists table! #158

Closed NightZpy closed 7 years ago

NightZpy commented 8 years ago

Only that, save to schema file from existing table in database! :D // Ready this feature, only add --save option and works equal that without use fromTable. Too, ask to user for each field for show or not in index, form, show_fields! Ask placeholder or label for each field, maybe lang, using langman package!

phillipmadsen commented 8 years ago

If you use the Fields_file Option then the inIndex is exatly what your are asking here "ask to user for each field for show or not in index, form, show_fields!".

Also the inForm means you want it in the form or not in the form.

just fyi

NightZpy commented 8 years ago

@phillipmadsen yes, i know, but not from schema (exists table in database).

mitulgolakiya commented 7 years ago

@NightZpy I think this is already done. as you can generate from table and pass --save option and it will save schema file. like,

php artisan infyom:api Team --tableName=teams --fromTable --save

That's what you need? Please correct me I'm miss understanding something.

Other than that, I don't really like to ask the user for each field, if they want to show it in an index, because if the table is really big then it can be a hurdle to say yes for every field or even if it's small then we have to say yes for each field. So that can be managed by the user manually later.

I know, its a very old issue and a far late reply on this. Sorry for that. But I've just started reviewing all old issues and closing them.