49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<!doctype html>
|
|
<html lang="es">
|
|
<head>
|
|
<title>Personal policial</title>
|
|
</head>
|
|
<body>
|
|
|
|
<p>
|
|
<a href="{{ route('personal.create') }}"><button> Nuevo personal </button></a>
|
|
</p>
|
|
|
|
<ul>
|
|
@foreach($personal as $per)
|
|
<li>
|
|
<strong>{{ $per->nombre }}</strong>
|
|
— {{ $per->apellido }}
|
|
— {{ $per->dni }}
|
|
— {{ $per->domicilio }}
|
|
(ID: {{ $per->id_personal}})
|
|
|
|
|
@if($per->trashed())
|
|
<form action="{{ route('personal.restaurar', $per->id_personal) }}"
|
|
method="POST" >
|
|
@csrf
|
|
@method('PUT')
|
|
<button type="submit" onclick="return confirm('¿Restaurar esta persona?')">
|
|
Restaurar
|
|
</button>
|
|
</form>
|
|
@else
|
|
<a href="{{ route('personal.show', $per->id_personal) }}"><button> VER MÁS </button></a>
|
|
|
|
<a href="{{ route('personal.edit', $per->id_personal) }}"><button> EDITAR </button></a>
|
|
|
|
<form action="{{ route('personal.destroy', $per->id_personal) }}"
|
|
method="POST" >
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" onclick="return confirm('¿Eliminar esta persona?')">
|
|
Eliminar
|
|
</button>
|
|
</form>
|
|
{{--<a href="{{ route('personal.edit', $per->id_personal) }}">Editar</a>
|
|
--}}
|
|
@endif
|
|
</li>
|
|
@endforeach
|
|
</ul>
|