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

45 lines
1.8 KiB
PHP

@extends('layouts.adminpanel')
@section('title') Admin Panel - Users @endsection
@section('admin_content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
@if ($users->count() > 0)
<h5> All users: ({{ $users->count() }}) </h5>
<table>
<tr>
<th>ID</th>
<th> Name </th>
<th> Surname </th>
<th> Email </th>
<th> Email verification date </th>
<th> Is admin </th>
<th> Creation date </th>
</tr>
@foreach ($users as $user)
<tr>
<td> {{ $user->id }}</td>
<td> {{ $user->name }} </td>
<td> {{ $user->surname }} </td>
<td> {{ $user->email }} </td>
<td> {{ $user->email_verified_at}}</td>
<td> {{ $user->is_Admin }} </td>
<td> {{ $user->creatied_at}}</td>
@if (!$user->is_Admin)
<td>
<a href="{{ route('admin_delete_user', [$user->id]) }}" name="delete-user-btn"> Delete </a>
</td>
@endif
</tr>
@endforeach
</table>
@else
<p> No users yet. </p>
@endif
</div>
</div>
</div>
@endsection