class Customer extends Model
{
use Notifiable;
public function routeNotificationForPushwoosh()
{
// In this example 'device_id' is a token previously
// retrieved from Pushwoosh using one of their SDKs
return (new PushwooshRecipient)->device($this->device_id);
}
}
class WishlistItemOnSale extends Notification
{
public function via($notifiable)
{
return ['pushwoosh'];
}
public function toPushwoosh($notifiable)
{
return (new PushwooshMessage)
->content('Your wishlist item ' . $this->product->name . ' is on sale, get it now!')
->url(route('products.show', $this->product))
->deliverAt(Carbon::now()->addMinutes(10));
}
}