|
|
|
@@ -17,17 +17,27 @@ class Controller extends BaseController |
|
|
|
{ |
|
|
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
|
|
|
|
|
|
|
public function updateCity() |
|
|
|
public function updateAddress() |
|
|
|
{ |
|
|
|
$subscribers = Subscriber::all(); |
|
|
|
|
|
|
|
foreach ($subscribers as $key => $a) { |
|
|
|
$a->unit_no = strtoupper($a->unit_no); |
|
|
|
$a->building_name = strtoupper($a->building_name); |
|
|
|
$a->street = strtoupper($a->street); |
|
|
|
$a->city = strtoupper($a->city); |
|
|
|
$a->state = strtoupper($a->state); |
|
|
|
$a->save(); |
|
|
|
if($a->unit_no != '' || $a->unit_no != null){ |
|
|
|
$a->unit_no = strtoupper($a->unit_no); |
|
|
|
} |
|
|
|
if ($a->building_name != '' || $a->building_name != null) { |
|
|
|
$a->building_name = strtoupper($a->building_name); |
|
|
|
} |
|
|
|
if ($a->street != '' || $a->street != null) { |
|
|
|
$a->street = strtoupper($a->street); |
|
|
|
} |
|
|
|
if ($a->city != ''|| $a->city != null) { |
|
|
|
$a->city = strtoupper($a->city); |
|
|
|
} |
|
|
|
if ($a->state != ''|| $a->state != null) { |
|
|
|
$a->state = strtoupper($a->state); |
|
|
|
} |
|
|
|
$a->save(); |
|
|
|
} |
|
|
|
|
|
|
|
return "Done standardize city in DB"; |