-
I need two relationships between a licenses table and the users table, e.g. in the licenses table I need licensee_id and licensor_id, both as foreign keys to the id in the users table. Eloquent relationships provide for this:
How can I achieve this within Orchid, and more specifically within the CRUD package? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I scratched about a bit and found it:
I don't see it mentioned in the docs at https://orchid.software/en/docs/field/#relation |
Beta Was this translation helpful? Give feedback.
I scratched about a bit and found it:
Relation::make('licensor_id') ->title('Licensor Name') ->fromModel(User::class, 'full_name','id'),
I don't see it mentioned in the docs at https://orchid.software/en/docs/field/#relation