'array', 'imagenes' => 'array', 'imagenes_explicacion' => 'array', 'activo' => 'boolean', ]; public function curso() { return $this->belongsTo(Curso::class); } public function scopeActivas($query) { return $query->where('activo', true); } public function scopeDeCurso($query, $cursoId) { return $query->where('curso_id', $cursoId); } public function scopeBuscar($query, $texto) { return $query->where(function ($q) use ($texto) { $q->where('enunciado', 'like', "%{$texto}%") ->orWhere('enunciado_adicional', 'like', "%{$texto}%") ->orWhere('explicacion', 'like', "%{$texto}%"); }); } }