'datetime', 'publicado' => 'boolean', 'destacado' => 'boolean', 'orden' => 'integer', ]; protected $appends = ['imagen_url']; public function getImagenUrlAttribute(): ?string { if (!$this->imagen_path) return null; return asset('storage/' . ltrim($this->imagen_path, '/')); } // Auto-generar slug si no viene protected static function booted(): void { static::saving(function (Noticia $noticia) { if (!$noticia->slug) { $noticia->slug = Str::slug($noticia->titulo); } }); } }