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
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card">
<div class="card-header">จัดการสมาชิก</div>
<div class="card-body">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<div>
You are logged in as Admintation
</div>
<br>
<table class="table table-hover table-bordered">
<thead align="center">
<th width="5">No.</th>
<th>ชื่อ</th>
<th>อีเมล์</th>
<th>สถานะ</th>
<th>วันที่สมัคร</th>
<th>ลบ</th>
</thead>
<tbody>
@foreach ($user as $key => $value)
<tr align="center">
<td>{{ $key+1 }}</td>
<td>{{ $value->name }}</td>
<td>{{ $value->email }}</td>
@if ( $value->admin == 1)
<td>ผู้ดูแลระบบ</td>
@else
<td>ผู้ใช้งาน</td>
@endif
<td>{{ $value->created_at }}</td>
<td><a href="/delete/user/{{ $value->id }}"><button type="button" class="btn btn-primary btn-sm">ลบ</button></a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endsection