Skip to main content

Relation Has Many

Badaso provides a feature to use Has Many relation. For more details about Has Many, you can visit documentation laravel.

Set Relation Has Many#

For use this feature, you can follow the step below:

  • Previously, using CRUD Management, first create a table that will generate CRUD. Example "books" dan "categories".

  • Create a CRUD management for the "books" table, then create a CRUD management for the "categories" table as shown below:

    • Click button "set other relation". Add relation Has Many

    • Choice relation type, destination table, destination column, and destination column to display. Add relation Has Many set options

    • but, if you have table polymorphism, you can use that with feature advanced setting and choice polymorphism table. after add relation has Many

  • Save and save CRUD.

Note: If you use a model, you must also use the model in the relation table.

Result#

Result has Many