Closed qlj closed 4 years ago
I've briefly read the documentation, and you extend hasOne() or hasMany() by matching tables by their field-names.
I have a situation where one of my tables contains the fields:
Would compoships support something like:
$this->hasOne( 'App\Models\Address', [ 'fk_id', someusefulhelper('fk_table') ], ['id', 'customers'] );
?
For situation like this, I suggest the use of where clauses in the definition of the relationships.
where
I've briefly read the documentation, and you extend hasOne() or hasMany() by matching tables by their field-names.
I have a situation where one of my tables contains the fields:
Would compoships support something like:
$this->hasOne( 'App\Models\Address', [ 'fk_id', someusefulhelper('fk_table') ], ['id', 'customers'] );
?