Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Improve runInQueue method: ability to parse args by key #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Naazer
Copy link

@Naazer Naazer commented Jul 26, 2018

Example of problem:

Run job in Feature

$this->runInQueue(MyJob::class, [
   'var3' => 'var3',
   'Var2' => 'var2',
    'Var1' => 'var1'
], 'q1');

Job

class MyJob extends Job implements ShouldQueue
{
      use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
      
      public function __construct($var1, $var2, $var3)
      {
            // var1 == var3, var2 == var2, var3 == 1
       }
}

Solution: use marshal

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant