/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function data() { $etapas = stage::orderBy('name', 'DESC')->get(); $actividades = Activity::orderBy('name', 'DESC')->get(); return response()->json(['etapas' => $etapas, 'actividades' => $actividades]); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function allStageAjax() { $etapas = stage::orderBy('identificador', 'ASC')->get(); return response()->json($etapas); }