@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $specialty->name = $request->input('name'); |
52 | 52 | $specialty->detail = $request->input('detail'); |
53 | 53 | |
54 | - if($specialty->save()) { |
|
54 | + if ($specialty->save()) { |
|
55 | 55 | return redirect(route('specialty.index')); |
56 | 56 | } |
57 | 57 | } |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | $specialty->name = $request->input('name'); |
101 | 101 | $specialty->detail = $request->input('detail'); |
102 | 102 | |
103 | - if($specialty->save()) { |
|
104 | - return redirect (route('specialty.index'))->with('success', 'Spesialisasi telah di update'); |
|
103 | + if ($specialty->save()) { |
|
104 | + return redirect(route('specialty.index'))->with('success', 'Spesialisasi telah di update'); |
|
105 | 105 | } |
106 | 106 | |
107 | - return redirect (route('specialty.edit', $id))->with('failed', 'Gagal memperbaharui spesialisasi !'); |
|
107 | + return redirect(route('specialty.edit', $id))->with('failed', 'Gagal memperbaharui spesialisasi !'); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | public function destroy($id) |
117 | 117 | { |
118 | 118 | $specialty = DoctorSpecialization::find($id); |
119 | - if($specialty->delete()) { |
|
119 | + if ($specialty->delete()) { |
|
120 | 120 | return redirect(route('specialty.index')); |
121 | 121 | } |
122 | 122 | } |
@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function index() |
19 | 19 | { |
20 | - $hospital = Hospital::orderBy('city_id','asc')->paginate(10); |
|
20 | + $hospital = Hospital::orderBy('city_id', 'asc')->paginate(10); |
|
21 | 21 | $data = [ |
22 | 22 | 'role' => session('role'), |
23 | 23 | 'hospital' => $hospital |
24 | 24 | ]; |
25 | - return view('pages.hospital')->with('data',$data); |
|
25 | + return view('pages.hospital')->with('data', $data); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | $hospital->public_services = $request->input('public_services'); |
63 | 63 | $hospital->cover_images_id = 1; |
64 | 64 | |
65 | - if($hospital->save()) { |
|
66 | - return redirect (route('hospital.index'))->with('success', 'Rumah sakit berhasil di tambahkan !'); |
|
65 | + if ($hospital->save()) { |
|
66 | + return redirect(route('hospital.index'))->with('success', 'Rumah sakit berhasil di tambahkan !'); |
|
67 | 67 | } |
68 | 68 | |
69 | - return redirect (route('hospital.index'))->with('failed', 'Gagal menambahkan rumah sakit !'); |
|
69 | + return redirect(route('hospital.index'))->with('failed', 'Gagal menambahkan rumah sakit !'); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | $hospital->public_services = $request->input('public_services'); |
133 | 133 | $hospital->cover_images_id = 1; |
134 | 134 | |
135 | - if($hospital->save()) { |
|
136 | - return redirect (route('hospital.index'))->with('success', 'Rumah sakit berhasil di perbaharui'); |
|
135 | + if ($hospital->save()) { |
|
136 | + return redirect(route('hospital.index'))->with('success', 'Rumah sakit berhasil di perbaharui'); |
|
137 | 137 | } |
138 | 138 | |
139 | - return redirect (route('hospital.edit', $id))->with('failed', 'Gagal memperbaharui rumah sakit !'); |
|
139 | + return redirect(route('hospital.edit', $id))->with('failed', 'Gagal memperbaharui rumah sakit !'); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $hospital = Hospital::find($id); |
151 | 151 | $rooms = $this->deleteRoomsAndRoomDetail($id); |
152 | 152 | |
153 | - if($hospital->delete() && $rooms) { |
|
153 | + if ($hospital->delete() && $rooms) { |
|
154 | 154 | return redirect(route('hospital.index')); |
155 | 155 | } |
156 | 156 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | ->where('hospital_id', '=', $hospital_id) |
171 | 171 | ->delete(); |
172 | 172 | |
173 | - if($delroom && $deldetail) { |
|
173 | + if ($delroom && $deldetail) { |
|
174 | 174 | return true; |
175 | 175 | } |
176 | 176 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $rooms = DB::table('rooms') |
187 | 187 | ->selectRaw(DB::raw('rooms.*')) |
188 | 188 | ->leftJoin('room_details', 'rooms.id', '=', 'room_details.room_id') |
189 | - ->where('room_details.hospital_id','=',$hospital_id) |
|
189 | + ->where('room_details.hospital_id', '=', $hospital_id) |
|
190 | 190 | ->get(); |
191 | 191 | |
192 | 192 | return $rooms; |