Esempio n. 1
0
 public function create($name)
 {
     Assertion::string($name);
     $tag = new Tag(['name' => $name, 'slug' => Str::slug($name)]);
     $tag->author()->associate($this->context->context());
     $this->tags->add($tag);
     return $tag;
 }