@extends('layouts.app')
@section('title', __('nav.users'))
@section('content')
<div class="d-flex justify-content-between mb-3"><h1 class="h4">{{ __('nav.users') }}</h1>@can('users.create')<a class="btn btn-success" href="{{ route('users.create') }}">{{ __('messages.create') }}</a>@endcan</div>
<div class="card"><table class="table mb-0"><thead><tr><th>{{ __('messages.name') }}</th><th>{{ __('messages.email') }}</th><th>{{ __('messages.role') }}</th><th>{{ __('messages.status') }}</th><th></th></tr></thead>
<tbody>@foreach($users as $u)<tr><td>{{ $u->name }}</td><td>{{ $u->email }}</td><td>{{ $u->roles->pluck('name')->join(', ') }}</td><td>{{ $u->status->label() }}</td><td>@can('users.edit')<a href="{{ route('users.edit',$u) }}">{{ __('messages.edit') }}</a>@endcan</td></tr>@endforeach</tbody></table>
<div class="card-body">{{ $users->links() }}</div></div>
@endsection
