validate([ 'nombre' => 'required', ]); $evento = new Evento(); $evento->nombre = $request->input("nombre"); $evento->save(); return redirect()->route("edit", ['evento' => $evento]); } /** * Display the specified resource. * * @param \App\Models\Evento $evento * @return \Illuminate\Http\Response */ public function show(Evento $evento) { // } /** * Show the form for editing the specified resource. * * @param \App\Models\Evento $evento * @return \Illuminate\Http\Response */ public function edit(Evento $evento) { return view("edit", ['evento' => $evento]); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\Evento $evento * @return \Illuminate\Http\Response */ public function update(Request $request, Evento $evento) { // } /** * Remove the specified resource from storage. * * @param \App\Models\Evento $evento * @return \Illuminate\Http\Response */ public function destroy(Evento $evento) { // } public function prueba() { return view("prueba"); } }