Best regards, colleagues, I have the following doubt regarding this, suppose I have the following functions in one of my controllers:
public function DatosEstudio(Request $request){
$ConsultaActividades=DB::table('actividades')->select('nombre_actividad')->where('nombre_actividad','like','1%')->get();
}
public function Recibir(Request $request){
}
How could the QueryActivities variable pass to the other function (Receive) that is in the same controller? In the receive function I also use request since this function must also get some data by form. I am trying it in the following way.
public function Recibir(Request $request)
{
$var= $this->DatosEstudio($consultaActividades);
return $consultaActividades;
}
But I miss the error, how should this procedure be done correctly?