taller/resources/views/permisos/index.blade.php
2026-10-15 08:51:58 -03:00

72 lines
1.9 KiB
PHP

@extends('layouts.admin')
@section('contenido')
<div class="container">
<h3>Listado de Permisos</h3>
<a href="{{ route('permisos.create') }}"
class="btn btn-success mb-3">
Nuevo Permiso
</a>
@if(session('mensaje-success'))
<div class="alert alert-success">
{{ session('mensaje-success') }}
</div>
@endif
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Nombre</th>
<th>Guard</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
@foreach($permisos as $permiso)
<tr>
<td>{{ $permiso->id }}</td>
<td>{{ $permiso->name }}</td>
<td>{{ $permiso->guard_name }}</td>
<td>
<a href="{{ route('permisos.show', $permiso->id) }}"
class="btn btn-info btn-sm">
Ver
</a>
<a href="{{ route('permisos.edit', $permiso->id) }}"
class="btn btn-warning btn-sm">
Editar
</a>
<form action="{{ route('permisos.destroy', $permiso->id) }}"
method="POST"
style="display:inline;">
@csrf
@method('DELETE')
<button type="submit"
class="btn btn-danger btn-sm"
onclick="return confirm('¿Eliminar permiso?')">
Eliminar
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection