File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 77use Illuminate \Database \Eloquent \Relations \BelongsTo ;
88use Illuminate \Database \Eloquent \SoftDeletes ;
99use Spatie \Permission \Traits \HasPermissions ;
10+ use Spatie \Permission \Traits \HasRoles ;
1011use Squarebit \Workflows \Traits \BelongsToWorkflow ;
1112
1213/**
@@ -29,7 +30,7 @@ class WorkflowTransition extends Model
2930 /** @use BelongsToWorkflow<WorkflowTransition> */
3031 use BelongsToWorkflow;
3132
32- use HasPermissions ;
33+ use HasRoles ;
3334 use SoftDeletes;
3435
3536 public string $ guard_name = 'web ' ;
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function initWorkflow(int|Workflow $workflow): static
5757 {
5858 $ isInitialized = WorkflowModelStatus::query ()
5959 ->where ('workflow_id ' , is_int ($ workflow ) ? $ workflow : $ workflow ->getKey ())
60- ->where ('model ' , $ this )
60+ ->whereMorphedTo ('model ' , $ this )
6161 ->count ();
6262
6363 if (! $ isInitialized ) {
You can’t perform that action at this time.
0 commit comments