- Creation of controller : CreateProject, for creation of the company works. - Controller : ProjectDatacontroller to manage data of the equipments and installations in general.
88 lines
3.9 KiB
PHP
88 lines
3.9 KiB
PHP
@extends('Templates/templateAdmin')
|
|
|
|
@section('Main-content')
|
|
<section class="content">
|
|
|
|
<div class="container-fluid">
|
|
@if (session('success'))
|
|
<div class="alert alert-success">
|
|
{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
<br>
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">Tabela Empresas</h3>
|
|
|
|
<div class="card-tools">
|
|
<div class="input-group input-group-sm" style="width: 150px;">
|
|
<input type="text" name="table_search" class="form-control float-right" placeholder="Search">
|
|
|
|
<div class="input-group-append">
|
|
<button type="submit" class="btn btn-default">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.card-header -->
|
|
<div class="card-body table-responsive p-0">
|
|
<table class="table table-hover text-nowrap">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Nome</th>
|
|
<th>Email</th>
|
|
<th>Tipo de Usuário</th>
|
|
<th>Ações</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($users as $user)
|
|
<tr>
|
|
<td>{{ $user->id }}</td>
|
|
<td>{{ $user->name }}</td>
|
|
<td>{{ $user->email }}</td>
|
|
{{-- <td>{{ $user->user_type }}</td> --}}
|
|
<td>{{ optional(\App\Models\TypeUser::find($user->user_type))->type }}</td>
|
|
|
|
<td class="text-center d-flex justify-content-around">
|
|
<a href="{{ route('users.Show', ['id' => $user->id]) }}">
|
|
<i class="fa-solid fa-eye text-secondary"></i>
|
|
</a>
|
|
<a href="{{ route('users.edit', ['id' => $user->id]) }}">
|
|
<i class="fa-solid fa-edit text-primary"></i>
|
|
</a>
|
|
{{-- <a href="#">
|
|
<i class="fa-solid fa-trash-alt text-danger"></i>
|
|
</a> --}}
|
|
<form action="{{ route('users.destroy', $user) }}" method="POST"
|
|
onsubmit="return confirm('Are you sure you want to delete this user?');"
|
|
style="display:inline;">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button type="submit" class="btn btn-danger btn-sm">
|
|
<i class="fa-solid fa-trash-alt text-white"></i>
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- /.card-body -->
|
|
</div>
|
|
<!-- /.card -->
|
|
|
|
|
|
|
|
|
|
</div>
|
|
{{-- /.container-fluid" --}}
|
|
|
|
|
|
</section>
|
|
@endsection
|