@extends('layouts.app') @section('content')
@include('common.error')
@csrf
@if (isset($RoleID))
 Grant All
@csrf @foreach ($permissions_list as $permission)
{{ $permission->controller_description }}
@if (!empty($RoleID)) @php $action_checked = true; @endphp @foreach(explode(',', $permission->action_desc) as $actionitem) @php list($actionname, $action) = explode('-', $actionitem); @endphp @if(!empty($role_permissions)) @foreach($role_permissions as $role_permission) @if ($role_permission->controller == $permission->controller && $role_permission->action == $action && $role_permission->has_access == 0) {{ $action_checked = false }} @endif @endforeach @endif @endforeach @else @php $action_checked = false; @endphp @endif  Check All
@foreach(explode(',', $permission->action_desc) as $actionitem)
@php list($actionname, $action) = explode('-', $actionitem); @endphp controller == $permission->controller && $role_permission->action == $action && $role_permission->has_access == 1) {{ $action_checked = true }} @endif @endforeach @if ($action_checked == true) {{ "checked" }} @endif @endif> {{$actionname}}
@endforeach
@endforeach
@endif
@endsection