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;
}