|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers; |
|
|
namespace App\Http\Controllers; |
|
|
|
|
|
|
|
|
use App\Model\Form; |
|
|
|
|
|
use App\Model\WorkOrder; |
|
|
|
|
|
|
|
|
use App\Model\Subscriber; |
|
|
use Illuminate\Foundation\Bus\DispatchesJobs; |
|
|
use Illuminate\Foundation\Bus\DispatchesJobs; |
|
|
use Illuminate\Routing\Controller as BaseController; |
|
|
use Illuminate\Routing\Controller as BaseController; |
|
|
use Illuminate\Foundation\Validation\ValidatesRequests; |
|
|
use Illuminate\Foundation\Validation\ValidatesRequests; |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
|
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
|
|
|
|
|
|
|
|
public function getUntaggedWorkOrder() |
|
|
|
|
|
|
|
|
public function updateCity() |
|
|
{ |
|
|
{ |
|
|
|
|
|
$subscribers = Subscriber::all(); |
|
|
|
|
|
|
|
|
$result = array(); |
|
|
|
|
|
$untaggedform = Form::where('customer_category', null)->get(); |
|
|
|
|
|
|
|
|
|
|
|
foreach ($untaggedform as $key => $a) { |
|
|
|
|
|
$work_order = WorkOrder::where('_id', $a->_id)->first(); |
|
|
|
|
|
|
|
|
|
|
|
if(!empty($work_order)){ |
|
|
|
|
|
array_push($result, array( |
|
|
|
|
|
'wo' => $work_order->wo, |
|
|
|
|
|
)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
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(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return $result; |
|
|
|
|
|
|
|
|
return "Done standardize city in DB"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |