Exemple #1
0
 /**
  * Get all tags for the called class as a string in which the tags are delimited
  * by the character defined in config('taggable.delimiters').
  *
  * @return string
  */
 public static function tagList()
 {
     return Util::joinArray(Util::getAllTags(get_called_class()));
 }
Exemple #2
0
 /**
  * Find a tag by its name.
  *
  * @param $name
  *
  * @return mixed
  */
 public static function findByName($name)
 {
     $normalized = Util::normalizeName($name);
     return static::where('normalized', $normalized)->first();
 }