I have a model X
, that has two FK: A_id
and B_id
. These FK come from the same model, Y
.
So, I was trying off how to get the data from the B_id
object: I tried getting, but it doesn't existe. This is my initialize()
:
$this->belongsTo('A_id', 'Y', 'id');
$this->belongsTo('B_id', 'Y', 'id');
I need to declare other model with different name but with same class internal definition?