From f775ca2220ea93e34a7932fbc537b4de55c25539 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Jun 2023 23:33:15 +0900 Subject: [PATCH 1/2] Update SettingsController.php for Nova 4.26.0 --- src/Http/Controllers/SettingsController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Http/Controllers/SettingsController.php b/src/Http/Controllers/SettingsController.php index 11f3c69..65ebd93 100644 --- a/src/Http/Controllers/SettingsController.php +++ b/src/Http/Controllers/SettingsController.php @@ -86,10 +86,10 @@ public function save(NovaRequest $request) $existingRow = $settingsClass::where('key', $field->attribute)->first(); - $tempResource = new \stdClass; + $tempResource = new \Laravel\Nova\Support\Fluent; $field->fill($request, $tempResource); - if (!property_exists($tempResource, $field->attribute)) return; + if (!isset($tempResource->{$field->attribute})) return; if (isset($existingRow)) { $existingRow->value = $tempResource->{$field->attribute}; @@ -166,7 +166,7 @@ protected function fields(Request $request, $path = 'general') protected function makeFakeResource(string $fieldName, $fieldValue) { - $fakeResource = new \stdClass; + $fakeResource = new \Laravel\Nova\Support\Fluent; $fakeResource->{$fieldName} = $fieldValue; return $fakeResource; } From 5e0d60e9b11438ca9172d10e709c27113271ceee Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 29 Jun 2023 13:51:52 +0900 Subject: [PATCH 2/2] Bump Nova version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8a764f8..b30742c 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "license": "MIT", "require": { "php": ">=8.0", - "laravel/nova": "^4.0", + "laravel/nova": "^4.26", "outl1ne/nova-translations-loader": "^5.0" }, "require-dev": {