Beispiel #1
0
 /**
  * @param Position $model
  */
 protected function preCreate(Position $model)
 {
     if (Text::create($model->getSlug())->isEmpty()) {
         $title = $model->getTitle();
         $slugifier = new Slugify();
         $model->setSlug($slugifier->slugify($title));
     }
 }