Presto
3234
4
General

Passing Data To Queue Job Class

Posted 3 years ago by Presto

Hello,

Im trying to build my first queued job class and I'm needing to pass data to my job class from my controller that queued the job. Is this the correct way to do it?

Within my controller

$this->dispatch(new ProcessPhoto($id, $file_name));
...

Within my Job class

public function handle($id, $file_name)
...

Please sign in or create an account to participate in this conversation.