mercredi 28 juillet 2021

When creating the role permission it cannot changing the status how can change status in single

//Blade Page

  @foreach ($permission as $permissions)
    <tr>
    <td class="text-center"></td>
     <td></td>
    @foreach ($role as $roles)
    <td class="text-center">
    @if ($roles->name == 'admin'||   $roles->name == 'superadmin')
      <span class="feather feather-check text-success icon-style-circle bg-success-transparent"></span>
    @else
     @csrf
    <input type="hidden"  name="name" class="role" value="">
    <input type="hidden"  name="role_id" class="role_id" value="">
    <input type="hidden" class="permissionid" name="permission[]" value="">
    @foreach ($permissionrule as $item)
        @if ($loop->index)
            @if ($item == null)
        <a href="javascript:void(0)" class="access-icon role1" id="checked1" ><span class="feather feather-x text-danger icon-style-circle bg-danger-transparent"></span>
            @else
        @if ( $item->permission_id ===  $permissions->id &&   $item->role_id === $roles->id)
        <a href="javascript:void(0)" class="access-icon role" id="checked" ><span class="feather feather-check text-success icon-style-circle bg-success-transparent"></span></a>
        @else   
        <a href="javascript:void(0)" class="access-icon role1" id="checked1" ><span class="feather feather-x text-danger icon-style-circle bg-danger-transparent"></span>
        @endif
        @endif  
        @endif
      @endforeach
      @endif
    </td>
    @endforeach
    </tr>
    @endforeach

enter image description here // controller page view part

   public function rolesss(){

        $role = Role::get();
        $data['role'] = $role;

        $permission = Permission::get();
        $data['permission'] = $permission;

        
        $permissionrule = DB::table('role_has_permissions')->get();
        $data['permissionrule'] = $permissionrule;

        return view('admin.roles.index')->with($data);
        
        }

When I creating the role permission and giving to access to the role. Is not changing the status. How can I change the status? Please check the image to tell me anybody know the information about roles and permission.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire