Relation Belongs to
Badaso provides a feature to use belongs to relation. Belongs to is the opposite of hasOne relationship. For more details about belongs to, you can visit dokumentasi laravel.
#
Set Relation Belongs toFor use this feature, you can follow the step below:
Previously, using CRUD Management, first create a table that will generate CRUD. Example "books".
Open CRUD Management, and edit the table that has been create.
Set the column according to what you want, in the column that is used as a relation, select the input relation type, press the "set relation" button.
In the form, follow these steps:
In Relation Type select "Belongs To".
In Destination Table select table relation.
In Destination Column select id.
In Destination Column To Display select column to display. for example "name".
More Data For API is an optional menu that is used to add data that will be returned by the API.
Save and save CRUD.