Skip to content

Commit

Permalink
Decode Laravel job
Browse files Browse the repository at this point in the history
  • Loading branch information
michielkempen committed Aug 30, 2023
1 parent e249696 commit a2c67a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/JobQueue/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ class Job extends PhpJob

private ?int $attempts;

public function __construct(mixed $payload)
{
parent::__construct(json_decode($payload, true));
}

public function getName(): ?string
{
return $this->name;
Expand Down

0 comments on commit a2c67a5

Please sign in to comment.