You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.4 KiB
49 lines
2.4 KiB
@extends('layouts.plantilla')
|
|
|
|
@section('contenido')
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<h1>Trabajadores</h1>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<a href="{{ route('trabajadores.create') }}" class="btn btn-primary">Agregar Trabajador</a>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Nombre</th>
|
|
<th>Teléfono</th>
|
|
<th>Género</th>
|
|
<th>Sueldo</th>
|
|
<th>Puesto</th>
|
|
<th>Número de Seguro</th>
|
|
<th>Correo Electrónico</th>
|
|
<th>Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($trabajadores as $trabajador)
|
|
<tr>
|
|
<td>{{ $trabajador->nombre }}</td>
|
|
<td>{{ $trabajador->telefono }}</td>
|
|
<td>{{ $trabajador->genero }}</td>
|
|
<td>{{ $trabajador->sueldo }}</td>
|
|
<td>{{ $trabajador->Puesto->nombre }}</td>
|
|
<td>{{ $trabajador->numero_seguro }}</td>
|
|
<td>{{ $trabajador->correo_electronico }}</td>
|
|
<td>
|
|
<a href="{{ route('trabajadores.edit', $trabajador->id) }}" class="btn btn-warning">Editar</a>
|
|
<form action="{{ route('trabajadores.destroy', $trabajador->id) }}" method="POST">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-danger">Eliminar</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|