关于队列(queues)dispatchFrom,dispatchFromArray

原创
2015/11/20 17:05
阅读数 53

 public function purchasePodcast(\Illuminate\Http\Request $request)

    {

      // var_dump($request->get('podcastId'));

        // $request=array('podcastId' =>$podcastId);

         // $this->dispatchFrom('App\Jobs\SendReminderEmail', $request);

        // $podcastId=Input::get('podcastId');

        $podcastId =Request::route('podcastId');

        //http://vm_a.com/purchase/123?podcastId=1 next output 1

        $this->dispatchFrom('App\Jobs\SendReminderEmail', $request);

        //next output 123

         // $this->dispatchFrom('App\Jobs\SendReminderEmail', $request,array('podcastId'=>$podcastId));

        // $this->dispatchFromArray('App\Jobs\SendReminderEmail',array('podcastId'=>$podcastId));

        //  $this->dispatch(

        //     new PurchasePodcast($podcastId)

        // );

        // Bus::dispatch(

        //     new PurchasePodcast($podcastId)

        // );

    }




展开阅读全文
打赏
0
0 收藏
分享
加载中
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部