Siti Hajar Ibrahim 5 роки тому
джерело
коміт
4507d33213
1 змінених файлів з 7 додано та 6 видалено
  1. 7
    6
      app/Http/Controllers/Controller.php

+ 7
- 6
app/Http/Controllers/Controller.php Переглянути файл

@@ -17,15 +17,16 @@ class Controller extends BaseController
{

$result = array();
$work_order = WorkOrder::all();
$untaggedform = Form::where('customer_category', null)->get();

foreach ($work_order as $key => $a) {
$untaggedform = Form::where('_id',$a->_id)->where('customer_category',null)->get();
dd($untaggedform);
foreach ($untaggedform as $key => $a) {
$work_order = WorkOrder::where('_id', $a->_id)->get();
if(!emptyArray($work_order)){
array_push($result, array(
'_id' => $untaggedform->_id,
'wo' => $work_order->wo,
));
}
}

return json_encode($result);

Завантаження…
Відмінити
Зберегти