/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(TipoRequest $request) { if ($request->ajax()) { Tipo::create($request->all()); return response()->json(["mensaje" => "creado"]); } // }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $tipos = Tipo::lists('tipo', 'id'); return view('escuelas.edit', ['escuela' => $this->escuela, 'tipos' => $tipos]); // }