Ejemplo 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;
 }
 /**
  * @param Tag $tag
  * @return mixed
  */
 public function delete(Tag $tag)
 {
     return $tag->delete();
 }