@@ -52,11 +52,11 @@ discard block |
||
| 52 | 52 | $specialty->name = $request->input('name'); |
| 53 | 53 | $specialty->detail = $request->input('detail'); |
| 54 | 54 | |
| 55 | - if($specialty->save()) { |
|
| 56 | - return redirect (route('specialty.index'))->with('success', 'Spesialisasi telah di tambahkan'); |
|
| 55 | + if ($specialty->save()) { |
|
| 56 | + return redirect(route('specialty.index'))->with('success', 'Spesialisasi telah di tambahkan'); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - return redirect (route('specialty.index'))->with('failed', 'Gagal menambah spesialisasi !'); |
|
| 59 | + return redirect(route('specialty.index'))->with('failed', 'Gagal menambah spesialisasi !'); |
|
| 60 | 60 | |
| 61 | 61 | } |
| 62 | 62 | |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | $specialty->name = $request->input('name'); |
| 105 | 105 | $specialty->detail = $request->input('detail'); |
| 106 | 106 | |
| 107 | - if($specialty->save()) { |
|
| 108 | - return redirect (route('specialty.index'))->with('success', 'Spesialisasi telah di update'); |
|
| 107 | + if ($specialty->save()) { |
|
| 108 | + return redirect(route('specialty.index'))->with('success', 'Spesialisasi telah di update'); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | - return redirect (route('specialty.edit', $id))->with('failed', 'Gagal memperbaharui spesialisasi !'); |
|
| 111 | + return redirect(route('specialty.edit', $id))->with('failed', 'Gagal memperbaharui spesialisasi !'); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | public function destroy($id) |
| 121 | 121 | { |
| 122 | 122 | $specialty = DoctorSpecialization::find($id); |
| 123 | - if($specialty->delete()) { |
|
| 123 | + if ($specialty->delete()) { |
|
| 124 | 124 | return redirect(route('specialty.index')); |
| 125 | 125 | } |
| 126 | 126 | } |
@@ -137,8 +137,8 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | public function indexSearch() |
| 139 | 139 | { |
| 140 | - $specialization = DoctorSpecialization::orderBy('created_at','desc')->orderBy('name', 'asc')->take(6)->get(); |
|
| 141 | - $location = City::pluck('name','id'); |
|
| 140 | + $specialization = DoctorSpecialization::orderBy('created_at', 'desc')->orderBy('name', 'asc')->take(6)->get(); |
|
| 141 | + $location = City::pluck('name', 'id'); |
|
| 142 | 142 | $data = [ |
| 143 | 143 | 'specialization' => $specialization, |
| 144 | 144 | 'location' => $location |
@@ -149,11 +149,11 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | public function searchSpecialty(Request $request) |
| 151 | 151 | { |
| 152 | - $specialization = DoctorSpecialization::where('name','LIKE','%'.$request->specialty.'%')->orderBy('name','asc')->get(); |
|
| 152 | + $specialization = DoctorSpecialization::where('name', 'LIKE', '%'.$request->specialty.'%')->orderBy('name', 'asc')->get(); |
|
| 153 | 153 | $data = [ |
| 154 | 154 | 'specialization' => $specialization |
| 155 | 155 | ]; |
| 156 | 156 | |
| 157 | - return view('LSdoctor')->with('data',$data); |
|
| 157 | + return view('LSdoctor')->with('data', $data); |
|
| 158 | 158 | } |
| 159 | 159 | } |