Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request for 'Related Form' example #7

Open
giordo opened this issue Mar 8, 2020 · 2 comments
Open

request for 'Related Form' example #7

giordo opened this issue Mar 8, 2020 · 2 comments

Comments

@giordo
Copy link

giordo commented Mar 8, 2020

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

@dandisy
Copy link
Owner

dandisy commented Mar 9, 2020

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
Copy link
Author

giordo commented Mar 9, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants