diff --git a/routes/web.php b/routes/web.php index 0756fda0..7ba9a394 100644 --- a/routes/web.php +++ b/routes/web.php @@ -140,8 +140,10 @@ Route::get('/customer/{marking}/details', function ($marking) { Route::get('/orders/refresh', function(\Illuminate\Http\Request $request){ - $packingLists = \App\Models\PackingList::where('type', \App\Classes\ValueObjects\Constants\PackingListType::WAREHOUSE_RECEIVE_LIST)->has('containers')->detach(); - dd($packingLists); + $packingLists = \App\Models\PackingList::where('type', \App\Classes\ValueObjects\Constants\PackingListType::WAREHOUSE_RECEIVE_LIST)->has('containers')->get(); + dd($packingLists->each(function (\App\Models\PackingList $packingList) { + $packingList->containers()->detach; + })); // FetchWarehouseReceiveListFromVTPortalJob::withChain([ // new FetchLoadedContainersFromVTPortalJob,