'integer']; protected $appends = ['types']; protected function getTypesAttribute(): array { return match ($this->type) { self::TYPE_BOTH => ['app', 'pc'], 'app', 'pc' => [$this->type], default => [], }; } protected function getImageAttribute($value) { return Util::ensureUrl($value); } protected function setImageAttribute($value) { $this->attributes['image'] = Util::replacePartInUrl($value); } }