From 46a1eb98423bdc2b85b9729c20ceba3d69e03af6 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Wed, 23 Oct 2024 15:45:15 -0400 Subject: [PATCH] do not hardcode the items field name --- formwidgets/MenuItems.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formwidgets/MenuItems.php b/formwidgets/MenuItems.php index 193154e..f29c0c4 100644 --- a/formwidgets/MenuItems.php +++ b/formwidgets/MenuItems.php @@ -58,7 +58,7 @@ public function prepareVars() $menuItem = new MenuItem; $this->vars['itemProperties'] = json_encode($menuItem->fillable); - $this->vars['items'] = $this->model->items; + $this->vars['items'] = $this->model->{$this->fieldName}; $emptyItem = new MenuItem; $emptyItem->title = trans($this->newItemTitle);