'Retrieved ContainerPackingLists', 'message' => 'You have successfully retrieved a list of ContainerPackingLists' ]; } /** @var CanListContainerPackingLists */ private $canListContainerPackingLists; /** @var ListsContainerPackingLists */ private $listsContainerPackingLists; /** * ListContainerPackingListsLogic constructor. * @param CanListContainerPackingLists $canListContainerPackingLists * @param ListsContainerPackingLists $listsContainerPackingLists */ public function __construct(CanListContainerPackingLists $canListContainerPackingLists, ListsContainerPackingLists $listsContainerPackingLists) { $this->canListContainerPackingLists = $canListContainerPackingLists; $this->listsContainerPackingLists = $listsContainerPackingLists; } /** * @param Request $request * @return JsonResponse * @throws ErrorException */ public function logic(Request $request) : JsonResponse { try { $this->canListContainerPackingLists->passes(); $query = $this->listsContainerPackingLists->execute($this->listsContainerPackingLists->deserializeFilters($request->input('filters'))); return $this->collectionResponse(ContainerPackingListResource::collection($query)); } catch (\Exception $exception){ throw new ErrorException($exception->getMessage(), $exception->getCode()); } } }