existsById() public method

* check this given user is exists
public existsById ( $id )
$id
Beispiel #1
0
 /**
  * send a message by using converstionid.
  *
  * @param int    $conversationId
  * @param string $message
  * @return \Nahid\Talk\Messages\Message|bool
  */
 public function sendMessage($conversatonId, $message)
 {
     if ($conversatonId && $message) {
         if ($this->conversation->existsById($conversatonId)) {
             $message = $this->makeMessage($conversatonId, $message);
             return $message;
         }
     }
     return false;
 }