change homepages to contents, add new methods to deliveries and sale_channels by customer

This commit is contained in:
ludo
2023-12-09 23:55:50 +01:00
parent 2a429e4163
commit 25b78f3380
28 changed files with 185 additions and 153 deletions

View File

@@ -153,6 +153,7 @@ class Customers
$customer = self::get($id, ['delivery_addresses', 'invoice_addresses', 'sale_channels']);
$data = $customer->toArray();
$data['sale_channels'] = $customer->sale_channels->pluck('id')->toArray();
$data['deliveries'] = Deliveries::getBySaleChannels($data['sale_channels'])->toArray();
return $data;
}