@@ -4,8 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Illuminate\Database\Eloquent\Model; |
6 | 6 | |
7 | -class DoctorDetail extends Model |
|
8 | -{ |
|
7 | +class DoctorDetail extends Model { |
|
9 | 8 | /** |
10 | 9 | * @var string |
11 | 10 | */ |
@@ -10,8 +10,7 @@ |
||
10 | 10 | use Illuminate\Support\Facades\Hash; |
11 | 11 | use Illuminate\Support\Facades\Storage; |
12 | 12 | |
13 | -class DocController extends Controller |
|
14 | -{ |
|
13 | +class DocController extends Controller { |
|
15 | 14 | /** |
16 | 15 | * Create a new controller instance |
17 | 16 | * |
@@ -6,8 +6,7 @@ |
||
6 | 6 | use App\City; |
7 | 7 | use App\DoctorSpecialization; |
8 | 8 | |
9 | -class SpecializationController extends Controller |
|
10 | -{ |
|
9 | +class SpecializationController extends Controller { |
|
11 | 10 | /** |
12 | 11 | * Display a listing of the resource. |
13 | 12 | * |
@@ -9,8 +9,7 @@ discard block |
||
9 | 9 | use Illuminate\Support\Facades\Hash; |
10 | 10 | |
11 | 11 | |
12 | -class DoctorController extends Controller |
|
13 | -{ |
|
12 | +class DoctorController extends Controller { |
|
14 | 13 | /** |
15 | 14 | * Display a listing of the resource. |
16 | 15 | * |
@@ -138,11 +137,11 @@ discard block |
||
138 | 137 | |
139 | 138 | public function searchDoctor(Request $request) |
140 | 139 | { |
141 | - if ($request->nama == null AND $request->location != null){ |
|
140 | + if ($request->nama == null AND $request->location != null) { |
|
142 | 141 | $doctor = Doctor::where('city_id',$request->location)->orderBy('name','asc')->paginate(5); |
143 | - }elseif ($request->location == null AND $request->nama != null){ |
|
142 | + } elseif ($request->location == null AND $request->nama != null) { |
|
144 | 143 | $doctor = Doctor::where('name','LIKE','%'.$request->nama.'%')->orderBy('name','asc')->paginate(5); |
145 | - }else{ |
|
144 | + } else { |
|
146 | 145 | $doctor = Doctor::where('name','LIKE','%'.$request->nama.'%')->where('city_id',$request->location)->orderBy('name','asc')->paginate(5); |
147 | 146 | } |
148 | 147 | $location = City::pluck('name','id'); |