Answer the question
In order to leave comments, you need to log in
How to properly write select with nested select in laravel?
Hello!
There is this request:
$doctors = \App\Doctor::select('doctors.*', \DB::raw('(SELECT file_name FROM images where doctors.id = images.doctor_id AND images.type = "doctor_face") as face_foto'))
->....
->paginate(10);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question