'datetime']; } public function text(string $field, ?string $locale = null): string { return $this->getAttribute($field.'_'.($locale ?? app()->getLocale())); } #[Scope] protected function published(Builder $query): void { $query->where('published_at', '<=', now()); } }