I have the following code:
return Visitor::with("checker")->select(
'idVisitor',
'firstname',
'lastname',
'middlename',
'birthday',
'document_number',
'pincode',
'company',
'idEvent',
'code',
'checker.name'
'status'
)->whereIn("idVisitor", $this->ids)->get();
As you can see I use related model: with("checker")
.
How to get this field value in select()
?
I tried: 'checker.name'
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire