style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
+17 -2
View File
@@ -1,4 +1,19 @@
<?php
namespace Modules\Workflow\Concerns;
use Illuminate\Database\Eloquent\Relations\MorphOne; use Modules\Workflow\Models\WorkflowInstance;
trait HasWorkflow { public function workflowInstance(): MorphOne { return $this->morphOne(WorkflowInstance::class,'subject'); } public function workflowLabel(): string { return (string) ($this->title ?? $this->name ?? class_basename($this).' #'.$this->getKey()); } }
use Illuminate\Database\Eloquent\Relations\MorphOne;
use Modules\Workflow\Models\WorkflowInstance;
trait HasWorkflow
{
public function workflowInstance(): MorphOne
{
return $this->morphOne(WorkflowInstance::class, 'subject');
}
public function workflowLabel(): string
{
return (string) ($this->title ?? $this->name ?? class_basename($this).' #'.$this->getKey());
}
}