我有以下代码:
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
之前将其发送到队列,一切都很好。