示例#1
0
 /**
  * @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'));
 }
示例#2
0
 /**
  * @param $domainId
  * @param DomainListener $listener
  * @return mixed
  */
 public function execute($domainId, DomainListener $listener)
 {
     $domain = $this->repository->getDomainById($domainId);
     $sshKey = $this->getPublicKey();
     $this->log->info('Show Domain id ' . $domainId, $domain->toArray());
     return $listener->view('domains.show', compact('domain', 'sshKey'));
 }
 /**
  * @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);
 }
示例#4
0
 /**
  * @param $domainId
  * @param DomainListener $listener
  * @return Redirect
  */
 public function execute($domainId, DomainListener $listener)
 {
     $domain = $this->repository->deleteDomain($domainId);
     $this->log->info('Domain Id: ' . $domainId . ' is deleted successfully');
     return $listener->domainRedirect($domain);
 }
 /**
  * @param $domainId
  * @param DomainListener $listener
  * @return Redirect
  */
 public function execute($domainId, DomainListener $listener)
 {
     $domain = $this->repository->newToken($domainId);
     $this->log->info('New Token Generated', $domain->toArray());
     return $listener->domainRedirect($domain);
 }