예제 #1
0
 /**
  * Create a Notification from user1 to user2.
  *
  * @param VisualAppeal\Connect\User $user1 (Default: null, newly created)
  * @param VisualAppeal\Connect\User $user2 (Default: null, newly created)
  *
  * @return VisualAppeal\Connect\Notification
  */
 protected function createNotification($user1 = null, $user2 = null)
 {
     $user1 = $user1 ?: $this->createUser();
     $user2 = $user2 ?: $this->createuser();
     $notification = \VisualAppeal\Connect\Notification::create(['from_user_id' => $user1->id, 'to_user_id' => $user2->id, 'icon' => 'test', 'message' => 'notification.test', 'message_parameters' => ['user' => $user1->name], 'url' => '', 'url_parameters' => []]);
     return \VisualAppeal\Connect\Notification::find($notification->id);
 }