atcheck/resources/views/admin/admin_users.blade.php

44 lines
1.7 KiB
PHP
Raw Normal View History

@extends('layouts.adminpanel')
@section('title') Admin Panel - Users @endsection
@section('admin_content')
2019-12-01 19:31:49 +01:00
<div class="row justify-content-center">
<div class="col-md-12">
@if ($users->count() > 0)
<h5> All users: ({{ $users->count() }}) </h5>
<table class="table table-striped">
<tr class="thead-dark">
<th>ID</th>
<th> Name </th>
<th> Surname </th>
<th> Email </th>
<th> Is admin </th>
<th></th>
<th></th>
</tr>
@foreach ($users as $user)
<tr>
2019-12-01 19:31:49 +01:00
<td> {{ $user->id }}</td>
<td> {{ $user->name }} </td>
<td> {{ $user->surname }} </td>
<td> {{ $user->email }} </td>
<td> {{ $user->is_Admin }} </td>
@if (!$user->is_Admin)
<td>
<a href="{{ route('admin_delete_user', [$user->id]) }}" name="delete-user-btn" class="btn btn-danger"> Delete </a>
</td>
<td>
2019-12-01 23:36:12 +01:00
<a href="{{ route('admin_edit_user', [$user->id]) }}" name="edit-user-btn" class="btn btn-secondary"> Edit </a>
2019-12-01 19:31:49 +01:00
</td>
@endif
</tr>
2019-12-01 19:31:49 +01:00
@endforeach
</table>
@else
<p> No users yet. </p>
@endif
</div>
</div>
@endsection