it's a row with another row, condition on id to info_status
relationship
public function status(){
return $this->hasOne(Row::class,'id','info_status')->select("id" ,"row")
}
result
Row::with('status')->find(5588)
=> App\Models\Row {#3563
id: 5588,
info_status: "2637",
status: App\Models\Row {#3576
id: 2637,
row: 1104,
},
}
how to get status->row->value ,become status->value at preloading sql builder ?
Is it possible ? doc didn't mention it.
//expect
=> App\Models\Row {#3563
id: 5588,
info_status: "2637",
status: 1104,
},
}