public function eventSlug($args, $model) { if ($this->{$args[1]}) { $this->{$args[0]} = CmsharenjoyString::slug($this->{$args[1]}); } else { $this->{$args[0]} = CmsharenjoyString::slug($this->{$args[0]}); } }
/** * To format a string * @param string $tagName * @return String */ protected function format($tagName) { return Str::title(CmsharenjoyString::slug(trim($tagName))); }
public function setTagAttribute($value) { $this->attributes['tag'] = Str::title(CmsharenjoyString::slug(trim($value))); }
/** * Create Slug * * Strip all odd characters out of a name and lowercase it * * @param string $name The uncleaned name string * @return string * **/ protected function createSlug($name) { $name = CmsharenjoyString::slug($name); return $name; }