Browse Source

am tweak response data

ifah
root 5 years ago
parent
commit
7437a4b681

BIN
app/Http/Controllers/CustomerService/.CustomerController.php.swp View File


+ 2
- 3
app/Http/Controllers/CustomerService/CustomerController.php View File

@@ -69,7 +69,7 @@ class CustomerController extends Controller
$nested_data = array();

if($type == 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->get();
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->orderBy('created_at', 'desc')->take(2)->get();
}else if($type != 'null' && $building == 'null' && $dealer == 'null'){
$form = Form::with('Subscriber','PackageDetail','WorkOrder')->where('type_service',$type)->orderBy('created_at', 'desc')->get();
}else if($type != 'null' && $building != 'null' && $dealer == 'null'){
@@ -102,7 +102,6 @@ class CustomerController extends Controller
$q->where('building_name', $building)->get();
}],'PackageDetail','WorkOrder')->where('type_service',$type)->where('company_id',$dealer)->orderBy('created_at', 'desc')->get();
}

if(!empty($form)){
foreach ($form as $key => $f) {
if(empty($f->WorkOrder)){
@@ -1392,4 +1391,4 @@ class CustomerController extends Controller
// Send JSON to the client.
echo $json;
}
}
}

+ 0
- 0
public/assets/NEW-CBB-LOGO-white-text.png View File


+ 0
- 0
public/assets/avatar/5bd68a26ee0dc2271a6cf2ac.jpg View File


Loading…
Cancel
Save