@extends('layouts/contentLayoutMaster') @section('title', 'Edit Role') @section('content') Edit Role @if ($message = Session::get('success')) {{ $message }} @endif @csrf {{-- @method('PUT') --}} Role Name @error('role') {{ $message }} @enderror Role Access Level Select Access Level access_level) == 1 ? 'selected' : '' }}>Collection Points (FFL) access_level) == 2 ? 'selected' : '' }}>Area Office access_level) == 3 ? 'selected' : '' }}>Zones access_level) == 4 ? 'selected' : '' }}>Sections access_level) == 5 ? 'selected' : '' }}>Departments access_level) == 6 ? 'selected' : '' }}>Plant @error('access_level') {{ $message }} @enderror Is Single Level? is_single == 1) checked @endif> Single Level Give Permissions to Role Check All {{-- --}} @foreach ($permissions as $key => $permission) @php if ($key == 'Permissions') { continue; } @endphp {{ $key }} @foreach ($permission as $specificPermission) @php try { $rolePermission = $role->permissions ->where('name', $specificPermission['name']) ->first() ->toArray(); } catch (\Throwable $th) { $rolePermission = []; } @endphp {{-- --}} {{ $specificPermission['name'] }} {{-- --}} @endforeach @php($iteration_no++) @endforeach Update Reset Cancel @endsection @section('page-script') @endsection