예제 #1
0
 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]});
     }
 }
예제 #2
0
 /**
  * To format a string
  * @param  string $tagName
  * @return String
  */
 protected function format($tagName)
 {
     return Str::title(CmsharenjoyString::slug(trim($tagName)));
 }
예제 #3
0
파일: Tag.php 프로젝트: sharenjoy/axes
 public function setTagAttribute($value)
 {
     $this->attributes['tag'] = Str::title(CmsharenjoyString::slug(trim($value)));
 }
예제 #4
0
 /**
  * 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;
 }