| Server IP : 54.233.248.239 / Your IP : 172.28.1.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/vinumday2_0/resources/views/admin/ |
Upload File : |
@extends($current_template)
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Usuários
<small>Listagem</small>
</h1>
<ol class="breadcrumb">
<li><a href="{{ url('admin') }}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li class="active">Usuários</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<a href="{{ url('admin/users/add') }}" class="table-add"><i class="fa fa-plus"></i> Adicionar</a>
<hr>
</div>
<!-- /.box-header -->
<div class="box-body">
<form action="<?php echo url('admin/users'); ?>" method="GET">
<div class="row">
<div class="col-md-3"> </div>
<div class="col-md-3">
Grupo :
<select id="id_role" name="id_role">
<option value="">Todos</option>
<?php foreach ($roles as $role): ?>
<option <?php echo (isset($_GET['id_role']) && $_GET['id_role'] == $role->id ? 'selected="selected"' : '')?> value="{{ $role->id }}">{{ $role->name }}</option>
<?php endforeach ?>
</select>
</div>
<div class="col-md-3">
E-mail :
<input value="<?php echo (isset($_GET['email'])) ? $_GET['email'] : '' ?>" type="text" name="email">
</div>
<div class="col-md-3">
<input value="<?php echo (isset($_GET['term'])) ? $_GET['term'] : '' ?>" type="text" name="term"><button class="btn btn-primary">Buscar</button>
</div>
</div>
</form>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>Nome</th>
<th>E-mail</th>
<th>Role</th>
<th>Último Login</th>
<th class="th-action">Ação</th>
</tr>
</thead>
<tbody>
<?php foreach ($listaUser as $user): ?>
<tr>
<td> <?php echo $user->id; ?></td>
<td> <?php echo $user->first_name; ?> <?php echo $user->last_name; ?></td>
<td> <?php echo $user->email; ?></td>
<td> <?php echo $user->roleUser ? $user->roleUser->role->name : ''; ?></td>
<td> <?php echo (!empty($user->last_login) ? date('d/m/Y H:i', strtotime($user->last_login)) : ''); ?></td>
<td>
<a href="/admin/users/edit/<?php echo $user->id; ?>" class="btn btn-primary"><i class="fa fa-pencil-alt"></i></a>
<a href="/admin/users/delete/<?php echo $user->id; ?>" class="btn btn-danger deletar"><i class="fa fa-trash"></i></a>
</td>
</tr>
<?php endforeach ?>
</tbody>
<tfoot>
<tr>
<th>Nome</th>
<th>Role</th>
<th>Ação</th>
</tr>
</tfoot>
</table>
<div class="text-center">
<?php echo $listaUser->appends([
'term' => (isset($_GET['term'])) ? $_GET['term'] : '',
'email' => (isset($_GET['email'])) ? $_GET['email'] : '',
'id_role' => (isset($_GET['id_role'])) ? $_GET['id_role'] : ''
])->links(); ?>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<a href="{{ url('admin/users/add') }}" class="table-add"><i class="fa fa-plus"></i> Adicionar</a>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
@endsection