Skip to content

Commit a44f65e

Browse files
committed
setup the fields after getting the entry localized
1 parent 21a0186 commit a44f65e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/Http/Controllers/Operations/UpdateOperation.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ public function edit($id)
6565
$this->crud->hasAccessOrFail('update');
6666
// get entry ID from Request (makes sure its the last ID for nested resources)
6767
$id = $this->crud->getCurrentEntryId() ?? $id;
68-
$this->crud->setOperationSetting('fields', $this->crud->getUpdateFields());
6968
// get the info for that entry
69+
7070
$this->data['entry'] = $this->crud->getEntryWithLocale($id);
71+
$this->crud->setOperationSetting('fields', $this->crud->getUpdateFields());
72+
7173
$this->data['crud'] = $this->crud;
7274
$this->data['saveAction'] = $this->crud->getSaveAction();
7375
$this->data['title'] = $this->crud->getTitle() ?? trans('backpack::crud.edit').' '.$this->crud->entity_name;
74-
7576
$this->data['id'] = $id;
7677

7778
// load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package

0 commit comments

Comments
 (0)