From 3417c64e40f31f9bb92015491debf22221fc2735 Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Thu, 6 Aug 2026 02:41:07 +0300 Subject: [PATCH] Fix call to undefined array_last() function Prefix array_last() with a leading backslash to call the global PHP function instead of resolving it within the current namespace. Closes #26 --- src/Workflow.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Workflow.php b/src/Workflow.php index 701fc0a..ec9ef5e 100644 --- a/src/Workflow.php +++ b/src/Workflow.php @@ -25,7 +25,6 @@ public function __construct(string $workflow_name) $workflow = $workflow->merge(['property_path' => $workflow['column']]); /** @var \Illuminate\Database\Eloquent\Model $model */ - // $model = app($workflow['model'])->findOrFail(array_last(request()->segments())); $model = app($workflow['model'])->findOrFail(Arr::last(request()->segments())); $stateMachine = new \SM\StateMachine\StateMachine($model, $workflow->toArray());