protected function setForeignKeysToNull(Model $model, Relation $relation, array $keys)
    {
        if ( ! count($keys)) return;

        $key           = $this->normalizeForeignKey(head($keys));
        $model->{$key} = null;

        if (    count($keys) > 1
            &&  (   $relation instanceof MorphTo
                ||  $relation instanceof MorphOne
                ||  $relation instanceof MorphMany
            )
        ) {
            $key           = $this->normalizeForeignKey(array_values($keys)[1]);
            $model->{$key} = null;
        }

        $model->save();
    }