@php $checkDoctorId = App\Models\Doctor::where('user_id', getLoggedInUserId())->first(); if(!empty($checkDoctorId)){ $checkDoctorSchedule = App\Models\Schedule::where('doctor_id', $checkDoctorId->id)->get(); } @endphp