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

relations om json model #432

Closed jschlies closed 7 years ago

jschlies commented 7 years ago

When I generate a model.json file, with this:

php artisan infyom:model --paginate=10 --skip=dump-autoload --tableName=clients --save --fromTable Client

I get the attached.

Note how the format (array with 2 or 3 elements, empty elements) and form (snake or canelcase) differ for the relation property. Is this on propose or an issue? If it is on propose, may I have a short explanation.

I'm working on adding additional unittest functionality and need to have a list of relations as a property of all models. You'll get a pull request from me in a week or so. Thanks Jim

mitulgolakiya commented 7 years ago

@jschlies can you share the schema of your Client table and re-open the issue if issue still persist?