/**
  * The function that builds the slug.
  *
  * The slug field takes precedence over the name.
  *
  * @param  Model  $model - the Slug model
  *
  * @return string
  */
 public function buildsSlug(Model $model)
 {
     if ($model->isDirty($model->getSlugColumnKey())) {
         $column = $model->getSlugColumnKey();
     } else {
         $column = $model->getNameColumnKey();
     }
     return $this->slugify->slugify($model->getAttribute($column), array_get($this->config, 'slug_separator'));
 }