예제 #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Clients
     $clients = player_has_doctor::where('doctor_id', Auth::user()->id)->where('status', player_has_doctor::STATUS_ACCEPTED)->get();
     $requests = player_has_doctor::where('doctor_id', Auth::user()->id)->where('status', player_has_doctor::STATUS_PENDING)->get();
     // Calendar
     $cal_events = calendarevent::where('doctor_id', Auth::user()->id)->where('type', calendarevent::TYPE_SHORT)->where('status', '<>', calendarevent::STATUS_PENDING)->get();
     $event_requests = calendarevent::where('doctor_id', Auth::user()->id)->where('type', calendarevent::TYPE_SHORT)->where('status', calendarevent::STATUS_PENDING)->get();
     return view('doctor.doctor_home', ['clients' => $clients, 'requests' => $requests, 'cal_events' => $cal_events, 'event_requests' => $event_requests]);
 }
예제 #2
0
 public function deny($id)
 {
     player_has_doctor::find($id)->update(['status' => player_has_doctor::STATUS_DENIED]);
     return Redirect::back();
 }