protected function getFieldToUpdate($fieldId, $fieldInput, $pageInput)
{
$scope = array_get($fieldInput, 'scope');
$newScope = array_get($fieldInput, 'new_scope', $scope);
$field = $scope == 'global' ? $this->GlobalField->whereId($fieldId)->firstOrFail() : $this->Field->whereId($fieldId)->firstOrFail();
if ($newScope !== $scope) {
$field = $this->changeFieldScope($field, $newScope, $fieldInput, $pageInput);
}
return $field;
}