Skip to content
This repository has been archived by the owner on Jun 17, 2019. It is now read-only.

Commit

Permalink
Creating route and function to display doctor by specialization
Browse files Browse the repository at this point in the history
  • Loading branch information
FauzanAr committed Apr 11, 2019
1 parent 7e7a1a1 commit 17b948c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/Http/Controllers/DoctorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ public function store(Request $request)
*/
public function show($id)
{
//
$doctor = Doctor::where('specialization_id',$id)->orderBy('name','asc')->paginate(5);
$data = [
'doctor' => $doctor
];
return view('pages.doctor')->with('data',$data);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
// Route::get('/lihatsemuadokter', function() {
// return view('LSdoctor');
// });
Route::get('/listdoctor', 'SpecializationController@indexUser')->name('list.doctor');
Route::get('/listdoctors', 'SpecializationController@indexUser')->name('list.doctor');

Route::get('/mainsearch-article', function() {
return view('MainSearchArt');
Expand Down

0 comments on commit 17b948c

Please sign in to comment.