isLandingPageEnabled) { return new RedirectResponse('/app'); } $cmd = new ListPlansCommand(); $cmd->setStatus(1); $cmd->setOrderBy('price', 'ASC'); $plans = $this->dispatcher->dispatch($cmd); $resources = []; foreach ($plans as $plan) { $resources[] = new PlanResource($plan); }; return new ViewResponse( '@theme/templates/index.twig', [ 'plans' => $resources ] ); } }