Laravel 5 - 数据未发送到队列作业

时间:2016-02-19 14:28:02

标签: laravel laravel-5

我有以下代码:

temp = ptrb;  
ptrb =ptra; 
ptra = temp;    

                        a
                 +--------------+
                 |              |
ptra -----+      |    2016      |
        +------> |              |
        | |      +--------------+
        | |
        | |
        | |
        | |             b
        | |      +--------------+
        | |      |              |
ptrb ---+ +----> |      0       |
                 |              |
                 +--------------+

我这样称呼:

protected $game;

/**
 * Create a new job instance.
 *
 * @return void
 */
public function __construct(Game $game)
{
    $this->game = $game;
}

/**
 * Execute the job.
 *
 * @return void
 */
public function handle()
{
    dd($this->game);
}

$game = Game::FindOrFail($game); $job = (new EndGame($game))->delay(60); dispatch($job); 方法handle会返回dd

如果我在发送null之前将其发送到队列,一切都很好。

0 个答案:

没有答案