| @@ -157,8 +157,8 @@ class Controller extends BaseController | |||
| return $work_order . $staff; | |||
| } | |||
| public function adjustInstaller(){ | |||
| $wo = WorkOrder::where('installer_id', '5f606ed1a1f29b50e429a422')->where('status', 'like', '%Pending%')->get(); | |||
| public function adjustInstaller(Request $request){ | |||
| $wo = WorkOrder::where('installer_id', $request->id)->where('status', 'like', '%Pending%')->get(); | |||
| foreach ($wo as $w) { | |||
| $w->status = "Pending Contractor"; | |||
| $w->installer_id = ""; | |||
| @@ -288,7 +288,7 @@ class WorkOrderController extends Controller | |||
| $product = Product::where('speed', $form->PackageDetail->name)->where('formT', $w->Form->type_application)->first(); | |||
| $company = Company::where('_id', $w->contractor_id)->first(); | |||
| // info($w->installer_id); | |||
| info($w->installer_id); | |||
| if ($w->installer_id != '') { | |||
| $installer = Staff::with('StaffDetail')->where('_id', $w->installer_id)->first(); | |||
| $installer = $installer->StaffDetail->name; | |||