/** * @param DomainListener $listener * @return mixed */ public function execute(DomainListener $listener) { $user = $this->auth->user(); $domains = $this->repository->listOfDomains($user->id); $this->log->info('Show Domains'); return $listener->view('domains.index', compact('domains')); }
/** * @param $domainData * @param DomainListener $listener * @return Redirect */ public function execute($domainData, DomainListener $listener) { $user = $this->auth->user(); $domainData['shortName'] = $domainData['name']; $domain = $this->repository->createDomain($user->id, $domainData); $this->storeNginxConfig($domain); $this->log->info('Domain Created', $domain->toArray()); return $listener->domainRedirect($domain); }