app/Service/Doctors/DoctorService.php
//get all doctor's social media by doctor's name
get all doctor's social media by doctor's name
get all doctor ' s social media by doctor ' s name
public function SocialMedia($doctor_name)
    {
        return doctor::with('socialMedia')
                     ->where("name","like","%".$doctor_name."%")
                     ->get();
    }
public function SocialMedia ( $ doctor_name ) { return doctor :: with ( 'socialMedia' ) -> where ( " name " , " like " , " % " . $ doctor_name . " % " ) -> get ( ) ; }
get all doctor's social media by doctor's name
get all doctor ' s social media by doctor ' s name