dandisy / webcore

Laravel site ready to be built on a single platform according to your needs (admin panel, web CMS, or others)
https://dandisy.github.io/
MIT License
52 stars 27 forks source link

request for 'Related Form' example #7

Open giordo opened 4 years ago

giordo commented 4 years ago

HI, I have a little difficult... can you provide an example about generate 'related form' ? Thank's

dandisy commented 4 years ago

first we must create model schema in resources/model_schemas, and the json file must contents definition for generate related form, as example :

// Redeem.json ...... { "name": "prerequisites", "dbType": "table", "htmlType": "related-form,prerequisite_metric,prerequisite_value" }, ......

and then run artisan command :

php artisan generate:scaffold Redeem --fieldsFile=Redeem.json --relations

this command will generated controller, model, and other related class, and also generated related form in fields.blade.php

giordo commented 4 years ago

Thank you for reply, the solution you propose couses an error during migrate:

In Macroable.php line 96:
Method table does not exist.

something wrong... do you have any suggestion?