Esempio n. 1
0
 /**
  * @param CreateTag $command
  * @return Tag
  */
 public function handle(CreateTag $command)
 {
     $actor = $command->actor;
     $data = $command->data;
     $this->forum->assertCan($actor, 'createTag');
     $tag = Tag::build(array_get($data, 'attributes.name'), array_get($data, 'attributes.slug'), array_get($data, 'attributes.description'), array_get($data, 'attributes.color'), array_get($data, 'attributes.isHidden'));
     $tag->save();
     return $tag;
 }