8000
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.
1 parent 51df5f3 commit c7fc5ffCopy full SHA for c7fc5ff
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