{{-- Вьюха: Список пользователей и их ролей --}} @extends('admin.layout') @section('title', 'Пользователи') @section('content_header')

Пользователи

@can('users.manage') Создать пользователя @endcan
@stop @section('breadcrumb') @stop @section('content') @if(session('success'))
{{ session('success') }}
@endif
@foreach($users as $user) @php $badge = $user->roleBadge(); @endphp @endforeach
# Имя Email Роль Инд. права Действия
{{ $user->id }} {{ $user->name }} @if($user->id === auth()->id()) вы @endif {{ $user->email }} @if($user->role) {{ $badge['label'] }} @else @endif @if($user->userPermissions->count()) {{ $user->userPermissions->count() }} overrides @else нет @endif @can('users.manage') @if(auth()->user()->canManage($user)) Права @if($user->id !== auth()->id())
@csrf @method('DELETE')
@endif @endif @endcan
@stop