Fix Doctor By Speciality
This commit is contained in:
@@ -44,8 +44,15 @@ class DoctorController extends Controller
|
||||
$query->whereHas('practitioner.person', function ($person) use ($search) {
|
||||
$person->where('name', 'LIKE', '%' . $search . '%');
|
||||
});
|
||||
})
|
||||
->whereHas('speciality');
|
||||
});
|
||||
|
||||
if ($request->has('speciality_id_in')) {
|
||||
$speciality_ids = explode(',', $request->speciality_id_in);
|
||||
$doctors->whereIn('speciality_id', $speciality_ids);
|
||||
} else if ($request->has('speciality_id')) {
|
||||
$doctors->where('speciality_id', $request->speciality_id);
|
||||
}
|
||||
|
||||
if ($request->has('hospital_id_in')) {
|
||||
$hospital_ids = explode(',', $request->hospital_id_in);
|
||||
$doctors->whereIn('organization_id', $hospital_ids);
|
||||
|
||||
Reference in New Issue
Block a user