app/Service/Doctors/DoctorService.php
//get  doctor's work place by doctor's name
get  doctor's work place by doctor's name
get doctor ' s work place by doctor ' s name
public function workplace($doctor_name)
    {
        return doctor::with('workPlace')
                     ->where("name","like","%".$doctor_name."%")
                     ->get();
    }
public function workplace ( $ doctor_name ) { return doctor :: with ( 'workPlace' ) -> where ( " name " , " like " , " % " . $ doctor_name . " % " ) -> get ( ) ; }
get  doctor's work place by doctor's name
get doctor ' s work place by doctor ' s name