applicant-site/resources/views/admin/users/index.blade.php

42 lines
1.8 KiB
PHP
Raw Permalink Normal View History

2024-02-14 10:20:40 +03:00
@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