/** * Display list of items of a Fund * * @param int $fundId * @param FundItemRepositoryInterface $fundItem * @return $this */ public function showItems($fundId, FundItemRepositoryInterface $fundItem) { $fund = $this->fund->findById($fundId); if (!$fund) { return (new Response())->setStatusCode(404); } return (new CollectionResponse($fundItem->findByFundId($fundId)))->asType('FundItem'); }