Hi, I want to select a data that is stored in an array, for example the data I need is in position 1, but I do not know how to select it:
My controller is the following, I have minimized it for greater understanding:
public function listaAlumnos()
{
$alumnos = DB::table('alumno')
->select('idalumno')
->get();
$pr = $alumnos->idalumno[1]; //Necesito que el registro en la posición 1 se guarde en $pr.
}
If someone could help me, thank you in advance.