1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@extends('layouts.main')
@section('title', 'Usuários')
@section('header')
@include('layouts.header', [
'user' => Auth::user(),
])
@endsection
@section('nav')
@include('layouts.navigation', ['menu' => $menu])
@endsection
@section('body')
<div>
<h3 class="h3"> Usuários </h3>
<div>
@include('components.alerts')
<div class="d-flex justify-content-end mb-2">
@include('components.buttons.btn-create', [
'id' => 'user_create',
'content' => 'Cadastrar',
'route' => route('user_create'),
])
</div>
<div class="border rounded px-4">
<table class="table table-hover mt-4">
<thead>
<tr>
<th class="w-50" scole="col">Nome</th>
<th class="w-50" scole="col">Email</th>
<th scole="col">Opções</th>
</tr>
</thead>
<tbody>
@foreach($users as $user)
<tr>
<td>{{ $user->name }}</td>
<td>{{ $user->email }}</td>
<td>
<div class="btn-group" role="group">
<div class="me-1">
@include('components.buttons.btn-edit', [
'route' => route('user_edit', ['id' => $user->id])
])
</div>
<div class="me-1">
@include('components.buttons.btn-delete', [
'id' => $user->id,
'route' => route('user_delete', ['id' => $user->id])
])
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection