Agregamos ver resultado

This commit is contained in:
Alejandro Tasistro 2021-12-09 17:10:56 -03:00
parent 5a500c32dd
commit c5c57ee7a1
4 changed files with 18 additions and 5 deletions

View File

@ -143,8 +143,8 @@ class EventoController extends Controller
//
}
public function prueba()
public function mostrarResultado(Request $request)
{
return view("prueba");
return redirect()->route('show',['evento' => $request->id]);
}
}

View File

@ -0,0 +1,3 @@
label {
float: left;
}

View File

@ -9,6 +9,7 @@
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
<link href='css/app.css' rel="stylesheet">
<link href='css/welcome.css' rel="stylesheet">
<!-- Styles -->
<style>
@ -47,6 +48,8 @@
<div class="grid grid-cols-1 md:grid-cols-2">
<div class="p-6">
<form id="nuevoevento" method="post" action="{{route('store')}}">
<label for="nombre">Nombre de evento</label>
<br>
@csrf
<input required name="nombre" type="text" class="formulario">
@error('nombre')
@ -57,9 +60,14 @@
</div>
<div class="p-6 border-t border-gray-200 dark:border-gray-700 md:border-t-0 md:border-l">
<form id="contrasena">
<input required name="contrasena" type="text" class="formulario">
<input type="submit" value="Gestionar evento">
<form id="ver-evento" method="get" action="{{route('resultado')}}">
<label for="evento">Id de evento</label>
<br>
<input required name="id" type="text" class="formulario">
@error('id')
<div class="alert alert-danger">Ingrese la ID del evento que quiere ver.</div>
@enderror
<input type="submit" value="Ver evento">
</form>
</div>
</div>

View File

@ -25,3 +25,5 @@ Route::post('/eventos/{evento}', [EventoController::class, 'update'])->name('upd
Route::get('/eventos/{evento}', [EventoController::class, 'edit'])->name('edit');
Route::get('/eventos/{evento}/resultado', [EventoController::class, 'show'])->name('show');
Route::get('/resultado', [EventoController::class, 'mostrarResultado'])->name('resultado');