55 lines
1.6 KiB
PHP
55 lines
1.6 KiB
PHP
@extends('layouts.default')
|
|
|
|
@section('title', '| Users')
|
|
|
|
@section('content')
|
|
<div class="col-lg-10 col-lg-offset-1">
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading"><h1>User Administration</h1></div>
|
|
|
|
<div class="panel-body">
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered table-striped">
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Email</th>
|
|
<th>Date/Time Added</th>
|
|
<th>Operations</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
@foreach ($users as $user)
|
|
<tr>
|
|
|
|
<td>{{ $user->name }}</td>
|
|
<td>{{ $user->email }}</td>
|
|
<td>{{ $user->created_at->format('F d, Y h:ia') }}</td>
|
|
<td>
|
|
@if(in_array('EditUser',$allperms))
|
|
<a href="{{ route('users.edit', $user->id) }}" class="btn btn-info pull-left" style="margin-right: 3px;">Edit</a>
|
|
@endif
|
|
|
|
@if(in_array('DeleteUser',$allperms))
|
|
{!! Form::open(['method' => 'DELETE', 'route' => ['users.destroy', $user->id] ]) !!}
|
|
{!! Form::submit('Delete', ['class' => 'btn btn-danger']) !!}
|
|
{!! Form::close() !!}
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
@if(in_array('CreateUser',$allperms))
|
|
<a href="{{ route('users.create') }}" class="btn btn-success">Add User</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|