/**
  * Shows the delete tenant form.
  *
  * @param Tenant $tenant
  * @return \Illuminate\View\View
  */
 public function delete(Tenant $tenant)
 {
     $deleteRoute = route('management-interface.tenant.deleted', $tenant->present()->urlArguments);
     $name = $tenant->present()->name;
     return view('management-interface::layouts.delete', compact('tenant', 'deleteRoute', 'name'));
 }
 /**
  * Registers model observers.
  */
 protected function observers()
 {
     Models\Website::observe(new Observers\WebsiteObserver());
     Models\Hostname::observe(new Observers\HostnameObserver());
     Models\Tenant::observe(new Observers\TenantObserver());
 }
 /**
  * Removes tenant and everything related.
  *
  * @param $name
  *
  * @return bool|null
  */
 public function forceDeleteByName($name)
 {
     $tenant = $this->tenant->where('name', $name)->first();
     return $tenant ? $tenant->delete() : null;
 }