The results of curl crawling third-party websites cannot be passed into the laravel asynchronous queue (mysql driver).

I use laravel to load a self-written class studenthelper, to obtain third-party website resources through curl. Synchronize queue parameters are passed normally, in asynchronous mode, and the parameters cannot be passed into the handle. of the job class. The code is as follows: Please enter the code public function handle ()

{
    $student= new StudentHelper($this->profile->name,$this->profile->password);
    $courses=$student->getCousesxx();//()
    dd($courses);
   

   ..........


}

you can crawl normal information in Synchronize mode


ask for advice.

in addition, I have tried to serialize the curl crawl results to json and other methods. The problem is that after the student class is instantiated, the result of calling the getcourses method (encapsulated with curl) cannot be passed into the asynchronous queue

Mar.23,2021

paste the different step code.

Menu