Example #1
0
 /**
  * However, with normal autoincrement ids - we have to set the slug after
  * the model has been persisted to the database - as then we have the id.
  *
  * @param $model
  */
 public function created(Model $model)
 {
     if ($model->slugStrategy() == 'id') {
         $model->generateIdSlug();
         $model->save();
     }
 }