We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d0dc85 commit 1cab217Copy full SHA for 1cab217
src/Trackable.php
@@ -57,13 +57,18 @@ protected function prepareStatus(array $data = [])
57
/** @var JobStatus $entityClass */
58
$entityClass = app()->getAlias(JobStatus::class);
59
60
- $data = array_merge(["type" => static::class], $data);
+ $data = array_merge(["type" => $this->getDisplayName()], $data);
61
/** @var JobStatus $status */
62
$status = $entityClass::create($data);
63
64
$this->statusId = $status->id;
65
}
66
67
+ protected function getDisplayName()
68
+ {
69
+ return method_exists($this, 'displayName') ? $this->displayName() : static::class;
70
+ }
71
+
72
public function getJobStatusId()
73
{
74
if ($this->statusId == null) {
0 commit comments