protected function checkUsableDomain($host) { $model = $this->createModel(); if ($model->newQuery()->where('host', $host)->exists()) { throw new CanNotUseDomainException(['host' => $host]); } }