@extends('template.app') @section('title', 'Users') @section('css') @endsection @section('breadcrumb') @endsection @section('content')
@include('components.toast-notification')
@foreach($usersWithRoles as $user) @endforeach
Username Email Role Created Date Actions
{{ $user->name }} {{ $user->email }} @php $roles = $user->roles->pluck('name')->implode(', '); @endphp @foreach(explode(', ', $roles) as $role) @if($role == 'admin') {{ $role }} @else {{ $role }} @endif @endforeach {{ $user->created_at }}
@can('users.edit') @endcan @can('users.delete') @endcan @cannot('users.edit') @cannot('delete_users') No Access @endcannot @endcannot
@endsection @section('js') @endsection