diff --git a/src/JobPipeline.php b/src/JobPipeline.php index a3f7bc3..f24bb8d 100644 --- a/src/JobPipeline.php +++ b/src/JobPipeline.php @@ -60,12 +60,12 @@ class JobPipeline implements ShouldQueue public function handle(): void { foreach ($this->jobs as $job) { - if (is_string($job)) { + if (is_string($job) && class_exists($job)) { $job = [new $job(...$this->passable), 'handle']; } try { - $result = app()->call($job); + $result = app()->call($job, $this->passable); } catch (Throwable $exception) { if (method_exists(get_class($job[0]), 'failed')) { call_user_func_array([$job[0], 'failed'], [$exception]);