Cviebrock\EloquentSluggable\Services\SlugService::needsSlugging PHP 메소드

needsSlugging() 보호된 메소드

Determines whether the model needs slugging.
protected needsSlugging ( string $attribute, array $config ) : boolean
$attribute string
$config array
리턴 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;
    }