Exemplo n.º 1
0
 /**
  * @param int $conversationId
  * @return \Illuminate\Http\RedirectResponse
  */
 public function store($conversationId)
 {
     $conversation = $this->conversations->findById($conversationId);
     $this->creator->create($conversation, Auth::user(), Input::all());
     $conversation->setUnread($conversation->contactPerson(Auth::user()));
     if ($conversation->isDeletedForContactPerson(Auth::user())) {
         $conversation->unDeleteForContactPerson(Auth::user());
     }
     return redirect()->back();
 }
 public function delete($conversationId)
 {
     $conversation = $this->conversations->findById($conversationId);
     $conversation->deleteForUser(Auth::user());
     return redirect()->back();
 }