From 7d7824c98e89cac9c08dda5beec12c366df18d3d Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Wed, 21 Jun 2023 09:03:47 +0700 Subject: [PATCH] Fix import activity stack --- app/Http/Controllers/ActivityController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/ActivityController.php b/app/Http/Controllers/ActivityController.php index fc3e04e..144b92c 100644 --- a/app/Http/Controllers/ActivityController.php +++ b/app/Http/Controllers/ActivityController.php @@ -467,6 +467,7 @@ class ActivityController extends Controller } $activity->parent_id = $activityStack[count($activityStack) - 1]->id ?? null; + array_push($activityStack, $activity); // there should be better way to except / filter attribute level before save because it's cause error // cant use except() / filter() on $activity collection somehow unset($activity->level);