From ebf6809acd6cbd0403174098f7893d805635d330 Mon Sep 17 00:00:00 2001 From: arindamkabir Date: Sat, 17 Aug 2019 16:17:31 +0600 Subject: [PATCH] Enhancement #41: showing doctors list in apointment page --- PROJECT CODE/app/Http/Controllers/DoctorController.php | 2 +- PROJECT CODE/resources/views/doctor/doctors.blade.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/PROJECT CODE/app/Http/Controllers/DoctorController.php b/PROJECT CODE/app/Http/Controllers/DoctorController.php index 22be404..46854bb 100644 --- a/PROJECT CODE/app/Http/Controllers/DoctorController.php +++ b/PROJECT CODE/app/Http/Controllers/DoctorController.php @@ -11,7 +11,7 @@ class DoctorController extends Controller //show all doctors public function index(){ $doctors = DB::table('doctors')->get(); - return view('doctor.doctors', ['doctor' => $doctors]); + return view('doctor.doctors', ['doctors' => $doctors]); } diff --git a/PROJECT CODE/resources/views/doctor/doctors.blade.php b/PROJECT CODE/resources/views/doctor/doctors.blade.php index 8fc7800..5a7a8c9 100644 --- a/PROJECT CODE/resources/views/doctor/doctors.blade.php +++ b/PROJECT CODE/resources/views/doctor/doctors.blade.php @@ -3,7 +3,16 @@ @section('content')
+
+ Doctors + @foreach($doctors as $doctor) + + + {{$doctor->doc_name}} + @endforeach + +