Skip to content

Commit 2dba86d

Browse files
committed
Merge pull request davibennun#27 from canfiax/master
Send method returns self and added getFeedback() method
2 parents 241bc22 + 5b2219b commit 2dba86d

File tree

1 file changed

+8
-4
lines changed
  • src/Davibennun/LaravelPushNotification

1 file changed

+8
-4
lines changed

src/Davibennun/LaravelPushNotification/App.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function __construct($config)
1515

1616
$adapterConfig = $config;
1717
unset($adapterConfig['environment'], $adapterConfig['service']);
18-
18+
1919
$this->adapter = new $adapterClassName($adapterConfig);
2020
}
2121

@@ -26,13 +26,17 @@ public function to($addressee)
2626
return $this;
2727
}
2828

29-
public function send($message, $options = array())
30-
{
29+
public function send($message, $options = array()) {
3130
$push = new Push($this->adapter, $this->addressee, ($message instanceof Message) ? $message : new Message($message, $options));
3231

3332
$this->pushManager->add($push);
33+
34+
$this->pushManager->push();
3435

35-
return $this->pushManager->push();
36+
return $this;
3637
}
3738

39+
public function getFeedback() {
40+
return $this->pushManager->getFeedback($this->adapter);
41+
}
3842
}

0 commit comments

Comments
 (0)