scriptSources()->whereKey($copyFrom)->exists()) { throw new InvalidCopyFromException(trans('exceptions.egg.invalid_copy_id')); } $egg->update([ 'script_install' => JsonValueGuard::nullableString(Arr::get($data, 'script_install')), 'script_is_privileged' => JsonValueGuard::boolean(Arr::get($data, 'script_is_privileged', true)), 'script_entry' => JsonValueGuard::string(Arr::get($data, 'script_entry')), 'script_container' => JsonValueGuard::string(Arr::get($data, 'script_container')), 'copy_script_from' => $copyFrom, ]); } }