本文整理匯總了PHP中app\Message::createMessage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Message::createMessage方法的具體用法?PHP Message::createMessage怎麽用?PHP Message::createMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Message
的用法示例。
在下文中一共展示了Message::createMessage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: saveNewMessageDetails
public static function saveNewMessageDetails()
{
$input = Request::all();
var_dump($input);
$msgCreated = Message::createMessage($input['eid'], $input['message']);
if ($msgCreated) {
return redirect()->route('events.event_details', array($input['eid']));
}
}
示例2: handle
/**
* Execute the command.
*
* @param UserRepository $userRepository
*
* @param ResponseRepository $responseRepository
*
* @return void
*/
public function handle(UserRepository $userRepository, MessageRepository $messageRepository)
{
$message = Message::createMessage($this->body, $this->senderId, $this->senderProfileImage, $this->senderName);
$response = MessageResponse::createMessageResponse($this->body, $this->senderId, $this->receiverId, $this->senderProfileImage, $this->senderName);
$userRepository->findById($this->receiverId)->messages()->save($message);
$messageRepository->findById($message->id)->messageResponses()->save($response);
$userRepository->findById($this->receiverId)->messageResponses()->save($response);
return true;
}
示例3: saveNewMessage
public static function saveNewMessage(Request $request)
{
$input = json_decode($request->getContent());
$msgCreated = Message::createMessage($input->chat_message[0]->eid, $input->chat_message[0]->message);
}