public function saveHistory($model, $historyField)
    {
        if (isset($model->{$historyField})) {
            $url_components = explode("\\", get_class($model));
            $url_components[2] = trim(preg_replace("([A-Z])", " $0", $url_components[2]), " ");

            $history = new History;
            $history->name = $model->{$historyField};
            $history->type = $url_components[2];
            $history->url = Url::toRoute(['update', 'id' => $model->id]);
            $history->save();
        }
    }