[WIP] Add thumb on offers, refactor categories, try to fix counter on relations polymorphic with eage loader, bad pattern !
This commit is contained in:
@@ -26,6 +26,14 @@ class Customers
|
||||
return Customer::find($id);
|
||||
}
|
||||
|
||||
public static function edit($id)
|
||||
{
|
||||
$customer = Customer::with(['addresses'])->find($id);
|
||||
$data = $customer->toArray();
|
||||
$data['deliveries'] = $customer->deliveries->pluck('id')->toArray();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public static function storeFull($data)
|
||||
{
|
||||
$deliveries = $data['deliveries'];
|
||||
|
||||
Reference in New Issue
Block a user