/**
  * [Handle the command]
  * @param  [type] $command [description]
  * @return [type]          [description]
  */
 public function handle($command)
 {
     $status = Status::publish($command->body);
     $status = $this->statusRepository->save($status, $command->userId);
     $this->dispatchEventsFor($status);
     return $status;
 }
Пример #2
0
 public function getStatuses($sender, $postId, $user)
 {
     if (checkFriendship($sender, $user)) {
         $status = Status::where('id', $postId)->first();
         return $status;
     } else {
         return 'Error:103';
     }
 }
Пример #3
0
function getStatusById($id)
{
    return Status::where('id', $id)->firstOrFail();
}