*/ use HasFactory; /** * The landlord the existing single-website data belongs to. */ public static function stommer(): self { return static::query()->firstOrCreate( ['slug' => 'stommer'], ['name' => 'Stommer'], ); } /** * @return array */ protected function casts(): array { return [ 'is_active' => 'boolean', ]; } /** * @return HasMany */ public function sites(): HasMany { return $this->hasMany(Site::class); } /** * @return HasMany */ public function properties(): HasMany { return $this->hasMany(Property::class); } /** * @return BelongsToMany */ public function users(): BelongsToMany { return $this->belongsToMany(User::class)->withPivot('role')->withTimestamps(); } }