mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
list customer with delayed shipment
This commit is contained in:
+7
-2
@@ -432,14 +432,19 @@ Route::get('/delayed_container/customers', function(){
|
||||
return $query->where('eta', '>', \Carbon\Carbon::parse('15-10-2022'));
|
||||
});
|
||||
})->get();
|
||||
|
||||
dd($containers);
|
||||
$orders = $containers->map(function($container){
|
||||
return $container->orders;
|
||||
})->flatten()->unique(function($order){
|
||||
return $order->company_module_id;
|
||||
});
|
||||
|
||||
dd($orders);
|
||||
$companies = CompanyModule::whereIn('id', $orders->pluck('company_module_id'))->get();
|
||||
|
||||
foreach ($companies as $company){
|
||||
$marking = $company->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
|
||||
echo '<a target="_blank" href="'.routes('customer.profile', $marking).'">'.$marking.'</a><br>';
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user