We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f8c3c8 + c7fc5ff commit e7679afCopy full SHA for e7679af
src/Queue/ClientDispatchable.php
@@ -63,4 +63,21 @@ public function resourceId(): ?string
63
{
64
return optional($this->clientJob)->resource_id;
65
}
66
+
67
+ /**
68
+ * Set the resource that the job relates to.
69
+ *
70
+ * If a job is creating a new resource, this method can be used to update
71
+ * the client job with the created resource. This method does nothing if the
72
+ * job was not dispatched by a client.
73
74
+ * @param $resource
75
+ * @return void
76
+ */
77
+ public function setResource($resource): void
78
+ {
79
+ if ($this->wasClientDispatched()) {
80
+ $this->clientJob->setResource($resource)->save();
81
+ }
82
83
0 commit comments