diff --git a/app/Http/Controllers/Admin/CompanyController.php b/app/Http/Controllers/Admin/CompanyController.php index 65cf509..39d8e95 100644 --- a/app/Http/Controllers/Admin/CompanyController.php +++ b/app/Http/Controllers/Admin/CompanyController.php @@ -57,9 +57,11 @@ class CompanyController extends Controller } public function counters_main_update(Request $request, string $name) { + $data = $request->all(); + $data['description'] = $data['description'] ?? ''; PageContent::updateOrCreate( ['name' => $name], - array_merge(['name' => $name], $request->all()) + array_merge(['name' => $name], $data) ); $block_names = MainPageCounters::values();; $blocks = PageContent::select('name', 'title', 'description', 'extra') diff --git a/resources/views/admin/counters_main/form.blade.php b/resources/views/admin/counters_main/form.blade.php index a2037a1..ff9b900 100644 --- a/resources/views/admin/counters_main/form.blade.php +++ b/resources/views/admin/counters_main/form.blade.php @@ -27,7 +27,7 @@