Cviebrock\EloquentSluggable\Services\SlugService::needsSlugging PHP Method

needsSlugging() protected method

Determines whether the model needs slugging.
protected needsSlugging ( string $attribute, array $config ) : boolean
$attribute string
$config array
return boolean
    protected function needsSlugging($attribute, array $config)
    {
        if (empty($this->model->getAttributeValue($attribute)) || $config['onUpdate'] === true) {
            return true;
        }
        if ($this->model->isDirty($attribute)) {
            return false;
        }
        return !$this->model->exists;
    }