diff --git a/app/Http/Controllers/HistorialController.php b/app/Http/Controllers/HistorialController.php new file mode 100644 index 0000000..86d4677 --- /dev/null +++ b/app/Http/Controllers/HistorialController.php @@ -0,0 +1,76 @@ +except('_token'); + + Historial::create($Datos_Historia); + + return redirect('/Historial'); + } + + + public function show(Historial $Historial) + { + + // $Historia= Historial::find($Historial); + return View ('admin.Historial.show',compact('Historial')); + + } + + + public function edit($historial) + { + // + $Historia= Historial::find($historial); + return View ('admin.Historial.edit',compact('Historia')); + } + + + public function update(Request $request, $historial) + { + // + $input = $request->all(); + + $Historia = Historial::find($historial); + + $Historia->update($input); + + //Redirecionas para no bugear el jalar de datos con reddirect para recargar la vista totalmente + return redirect('/Historial'); + + } + + + public function destroy( $Historial) + { + // + Historial::destroy($Historial); + + // $Historial->delete(); + + return redirect('/Historial'); + } +} diff --git a/app/Models/Historial.php b/app/Models/Historial.php new file mode 100644 index 0000000..66aaa09 --- /dev/null +++ b/app/Models/Historial.php @@ -0,0 +1,15 @@ + + +
Nombre de la Sede : {{ $Historial->id_sede }}
+Nombre del Medico : {{ $Historial->id_medico }}
+Fecha del Historial: {{ $Historial->fecha_historial }}
+Detalles de la Historia: {{ $Historial->detalles_historial }}
+