@extends('layouts/contentNavbarLayout') @section('title', 'Roles') @section('content')

Roles List

A role provided access to predefined menus and features so that depending on assigned role an administrator can have access to what user needs.

@if(session('success'))
{{ session('success') }}
@endif @if ($errors->any())
@endif
@foreach($roles as $role)
@if($role->users->isEmpty())
No users in this role.

@else
Total {{ $role->users->count() }} users
    @foreach($role->users->take(3) as $user)
  • @endforeach @if($role->users->count() > 3)
  • +{{ $role->users->count() }}
  • @endif
@endif
{{ ucwords($role->name) }}
@can(\App\Constants\Permissions::ROLE_UPDATE) Edit Role @include('content.roles.role-edit') @endcan
@can(\App\Constants\Permissions::ROLE_DELETE)
@csrf @method('DELETE')
@endcan
@endforeach @can(\App\Constants\Permissions::ROLE_CREATE)
Image

Add new role,
if it doesn't exist.

@endcan
@include('content.roles.role-create') @endsection