Explorar el Código

add condition if wo not empty

ifah
Siti Hajar Ibrahim hace 5 años
padre
commit
cbf27fbeba
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3
    0
      app/Http/Controllers/Controller.php

+ 3
- 0
app/Http/Controllers/Controller.php Ver fichero

@@ -21,10 +21,13 @@ class Controller extends BaseController

foreach ($response->data as $key => $r) {
$work_order = WorkOrder::where('wo', $r->wo)->first();

if(!empty($work_order)){
$form_submitted = Form::where('_id', $work_order->_id)->first();

$form_submitted->customer_category = $r->category;
$form_submitted->save();
}
}

return 'data inserted ';

Cargando…
Cancelar
Guardar