@extends('admin.layouts.app') @section('title', 'Edit Roles') @section('content')

Edit Role

@method('PUT')
{{-- display permissions --}}
Permissions

@if (!empty($permissions)) @php $defaultPermissions = config( "role_defaults.{$role->department->id}", ); @endphp @foreach ($permissions as $module => $modulePermissions)
@foreach ($modulePermissions as $permission)
name, $defaultPermissions ?? []) || $hasPermissions->contains($permission->name) ? 'checked' : '' }} {{ in_array($permission->name, $defaultPermissions ?? []) ? 'disabled' : '' }}> {{-- hidden checks submitted --}} @if (in_array($permission->name, $defaultPermissions ?? [])) @endif
@endforeach
@endforeach @endif
@endsection @section('scripts') @endsection