*/ use HasFactory; use HasPublication; protected static function booted(): void { static::saving(function (Service $service): void { if (blank($service->slug) && filled($service->title)) { $service->slug = Str::slug($service->title); } }); } /** * @return array */ protected function casts(): array { return [ 'is_featured' => 'boolean', 'published_at' => 'datetime', 'sort_order' => 'integer', ]; } }