I have the following function that shows a student's course
public function show($id)
{
$alumno = Alumno::find($id);
$curso = Matricula::where('id_alumno',$id)->get()->pluck('curso_alumno');
dd($curso);
return view('alumnos.show')->with('alumno',$alumno)->with('curso',$curso);
}
THE method:
public function getCursoAlumnoAttribute()
{
return $this->curso->nombre. ' - ' . $this->curso->tipo.' / '.$this->curso->created_at->year;
}
But in my view it shows it to me in the following way:
Course ["First Medium A - Scientific Humanist / 2017"]
How can I eliminate those brackets, double quotes, and the duplicate "/" ???