From a12a68e4e9a40c1753f822b823cf912a7aa06665 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Thu, 24 Aug 2023 15:28:12 -0600 Subject: [PATCH] Add a variable so I dont ended rewriting the original model --- resources/views/models/edit.blade.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/views/models/edit.blade.php b/resources/views/models/edit.blade.php index 73220ae6ba97..8d33f94b1593 100755 --- a/resources/views/models/edit.blade.php +++ b/resources/views/models/edit.blade.php @@ -34,12 +34,13 @@ @php - if (is_null($item->id)){ - $item->id = $item->getOriginal('id'); + $model_id = $item->id; + if (is_null($model_id)){ + $model_id = $item->getOriginal('id'); } @endphp -@livewire('custom-field-set-default-values-for-model',["model_id" => $item->id]) +@livewire('custom-field-set-default-values-for-model',["model_id" => $model_id]) @include ('partials.forms.edit.notes') @include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/models/general.requestable')])