42 lines
1.8 KiB
PHP
42 lines
1.8 KiB
PHP
@extends('layouts.admin_layout')
|
|
@section('content')
|
|
@auth()
|
|
@can('viewAny', Auth::user())
|
|
<div class="container">
|
|
<h2>список Администраторов</h2>
|
|
<br>
|
|
<a href="{{ route('users.create') }}" class="btn btn-primary">Создать администратора</a>
|
|
<br>
|
|
<br>
|
|
<table class="table">
|
|
<thead class="border-b-2 border-solid border-black text-left" style="text-align: left">
|
|
<tr>
|
|
<th scope="col">id</th>
|
|
<th scope="col">name</th>
|
|
<th scope="col">email</th>
|
|
<th scope="col">действия</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($users as $user)
|
|
<tr>
|
|
<th scope="row">{{ $user->id }}</th>
|
|
<td>{{ $user->name }}</td>
|
|
<td>{{ $user->email }}</td>
|
|
<td><a href="{{ route("users.edit", $user) }}" class="btn btn-secondary">редактировать</a>
|
|
<a rel="nofollow" data-method="delete" data-confirm="Вы действительно хотите удалить?"
|
|
href="{{ route('users.destroy', $user) }}" class="btn btn-danger">
|
|
удалить
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
<br>
|
|
</div>
|
|
@endcan
|
|
@endauth
|
|
@endsection
|