src/Platform/Models/Role.php
public function setPermissionsAttribute(array $permissions = [])
    {
        foreach ($permissions as $key => $value) {
            $permissions[$key] = (bool) $value;
        }
        $this->attributes['permissions'] = json_encode($permissions ?? []);
    }
public function setPermissionsAttribute(array $permissions = [])
    {
        foreach ($permissions as $key => $value) {
            $permissions[$key] = (bool) $value;
        }
        $this->attributes['permissions'] = json_encode($permissions ?? []);
    }
public function setPermissionsAttribute ( array $ permissions = [ ] ) { foreach ( $ permissions as $ key => $ value ) { $ permissions [ $ key ] = ( bool ) $ value ; } $ this -> attributes [ 'permissions' ] = json_encode ( $ permissions ?? [ ] ) ; }
Set permission as boolean.

@param array $permissions
Set permission as boolean .