how to show related data in create/edit page ?
mtariqsajid opened this issue · 4 comments
mtariqsajid commented
Is there any option to show data of related field in drop down when create page or edit page is open.
right now its show as a input field not as a select field .
mitulgolakiya commented
I'm not 100% sure, but this might help with some tweak. https://infyom.com/open-source/laravelgenerator/docs/relationships
mtariqsajid commented
can you please give example of what need to be input when this command is ran
php artisan infyom:api_scaffold Post --relations
relationship_type,model_name,field1,field2,field3
what should i provide for relationship type ?
filed1 ?
mitulgolakiya commented
https://github.com/InfyOmLabs/laravel-generator/blob/develop/src/Generators/ModelGenerator.php#L201
- 1t1 - One to One
- mt1 - Many to One
- 1tm - One to Many
- mtm - Many to Many
- hmt - Has Many Through
mtariqsajid commented
https://github.com/InfyOmLabs/laravel-generator/blob/develop/src/Generators/ModelGenerator.php#L201
- 1t1 - One to One
- mt1 - Many to One
- 1tm - One to Many
- mtm - Many to Many
- hmt - Has Many Through
OK, thanks. I will check this out.