From ed5b4ca0a2937c05e96cb7259501f3f956162c48 Mon Sep 17 00:00:00 2001 From: Robert-Azelis <82208283+Robert-Azelis@users.noreply.github.com> Date: Sun, 13 Aug 2023 17:18:25 +0200 Subject: [PATCH] Update CompaniesController.php --- app/Http/Controllers/CompaniesController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/CompaniesController.php b/app/Http/Controllers/CompaniesController.php index b02e3194f9..6c4072362f 100644 --- a/app/Http/Controllers/CompaniesController.php +++ b/app/Http/Controllers/CompaniesController.php @@ -62,6 +62,7 @@ final class CompaniesController extends Controller $company->name = $request->input('name'); $company->phone = $request->input('phone'); $company->fax = $request->input('fax'); + $company->email = $request->input('email'); $company = $request->handleImages($company); @@ -115,6 +116,7 @@ final class CompaniesController extends Controller $company->name = $request->input('name'); $company->phone = $request->input('phone'); $company->fax = $request->input('fax'); + $company->email = $request->input('email'); $company = $request->handleImages($company); @@ -123,8 +125,7 @@ final class CompaniesController extends Controller ->with('success', trans('admin/companies/message.update.success')); } - return redirect()->route('companies.edit', ['company' => $companyId]) - ->with('error', trans('admin/companies/message.update.error')); + return redirect()->back()->withInput()->withErrors($company->getErrors()); } /**