Php 如何将PushNotification添加到Laravel队列?

Php 如何将PushNotification添加到Laravel队列?,php,laravel-4,queue,Php,Laravel 4,Queue,我在我的Laravel Forge服务器上设置了自动iOS推送通知。但是,有时并非所有推送通知都被发送出去。所以,我试图通过将它们添加到队列中来解决这个问题。这是我现在掌握的代码: $devices = DB::table('devices')->get(); foreach ($devices as $device) { $push = PushNotification::app('Development') ->to($device-&g

我在我的Laravel Forge服务器上设置了自动iOS推送通知。但是,有时并非所有推送通知都被发送出去。所以,我试图通过将它们添加到队列中来解决这个问题。这是我现在掌握的代码:

$devices = DB::table('devices')->get();

foreach ($devices as $device)
{
    $push = PushNotification::app('Development')
                ->to($device->device)
                ->send($message);

     $push = PushNotification::app('Distribution')
                ->to($device->device)
                ->send($message);
}
现在,我试着这样做:

$this->dispatch($push = PushNotification::app('Distribution')
                ->to($device->device)
                ->send($message));

但是,这显然是行不通的。我如何正确地做到这一点?我必须承认,我不太理解添加到队列的语法,而且文档在这方面不是很清楚也没有帮助。

您找到了如何做到这一点吗?