Changeset View
Changeset View
Standalone View
Standalone View
src/app/Domain.php
Show First 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | public function isEmpty(): bool | ||||
return !( | return !( | ||||
\App\User::whereRaw('substr(email, ?) = ?', [-$suffixLen, $suffix])->exists() | \App\User::whereRaw('substr(email, ?) = ?', [-$suffixLen, $suffix])->exists() | ||||
|| \App\UserAlias::whereRaw('substr(alias, ?) = ?', [-$suffixLen, $suffix])->exists() | || \App\UserAlias::whereRaw('substr(alias, ?) = ?', [-$suffixLen, $suffix])->exists() | ||||
|| \App\Group::whereRaw('substr(email, ?) = ?', [-$suffixLen, $suffix])->exists() | || \App\Group::whereRaw('substr(email, ?) = ?', [-$suffixLen, $suffix])->exists() | ||||
); | ); | ||||
} | } | ||||
/** | /** | ||||
* Any (additional) properties of this domain. | |||||
* | |||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany | |||||
*/ | |||||
public function settings() | |||||
{ | |||||
return $this->hasMany('App\DomainSetting', 'domain_id'); | |||||
} | |||||
/** | |||||
* Suspend this domain. | * Suspend this domain. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function suspend(): void | public function suspend(): void | ||||
{ | { | ||||
if ($this->isSuspended()) { | if ($this->isSuspended()) { | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |