protected function save($command) { $message = new Message(); $message->message = $command->message; $ticket = new Ticket(); $ticket->subject = $command->subject; $ticket->name = $command->name; $ticket->email = $command->email; $ticket->setCategory(Category::find($command->category_id)); // Need repo $ticket->setStaffer(Staffer::find($command->staffer_id)); // Need repo $ticket->addMessage($message); $this->repository->save($ticket); $this->dispatcher->dispatch($ticket->flushEvents()); }