/**
  * Generate a unique suffix for the given slug.
  *
  * @param  string     $slug
  * @param  Model      $model
  * @param  Collection $list
  *
  * @return string
  */
 protected function generateSuffix($slug, Model $model, Collection $list)
 {
     $separator = array_get($this->config, 'slug_separator');
     $len = strlen($slug . $separator);
     // If the slug already exists, but belongs to
     // our model, return the current suffix.
     if ($list->search($slug) === $model->{$model->getSlugColumnKey()}) {
         $suffix = explode($separator, $slug);
         return end($suffix);
     }
     $list->transform(function ($value, $key) use($len) {
         return intval(substr($value, $len));
     });
     // find the highest value and return one greater.
     return $list->max() + 1;
 }