src/Defender/Traits/Permissions/InteractsWithPermissions.php
public function revokeExpiredPermissions()
    {
        $expiredPermissions = $this->permissions()->wherePivot('expires', '<', Carbon::now())->get();

        if ($expiredPermissions->count() > 0) {
            return $this->permissions()->detach($expiredPermissions->modelKeys());
        }
    }
public function revokeExpiredPermissions()
    {
        $expiredPermissions = $this->permissions()->wherePivot('expires', '<', Carbon::now())->get();

        if ($expiredPermissions->count() > 0) {
            return $this->permissions()->detach($expiredPermissions->modelKeys());
        }
    }
public function revokeExpiredPermissions ( ) { $ expiredPermissions = $ this -> permissions ( ) -> wherePivot ( 'expires' , '<' , Carbon :: now ( ) ) -> get ( ) ; if ( $ expiredPermissions -> count ( ) > 0 ) { return $ this -> permissions ( ) -> detach ( $ expiredPermissions -> modelKeys ( ) ) ; } }
Revoke expired user permissions.

@return int|null
Revoke expired user permissions .