Skip to content

Commit 6bf6313

Browse files
authored
Return notification response.
1 parent 0cc0ebd commit 6bf6313

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/FacebookChannel.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ public function __construct(Facebook $fb)
3131
* @param mixed $notifiable
3232
* @param Notification $notification
3333
*
34+
* @return array
35+
*
3436
* @throws CouldNotCreateMessage
3537
* @throws CouldNotSendNotification
3638
* @throws GuzzleException
3739
*/
38-
public function send($notifiable, Notification $notification): void
40+
public function send($notifiable, Notification $notification): array
3941
{
4042
$message = $notification->toFacebook($notifiable);
4143

@@ -51,6 +53,8 @@ public function send($notifiable, Notification $notification): void
5153
$message->to($to);
5254
}
5355

54-
$this->fb->send($message->toArray());
56+
$response = $this->fb->send($message->toArray());
57+
58+
return json_decode($response->getBody()->getContents(), true);
5559
}
5660
}

0 commit comments

Comments
 (0)