From d8f88103e3a02fe2a0e67affaec75b1a30a765f4 Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Thu, 20 Oct 2016 13:29:35 +0000 Subject: [PATCH] Applied fixes from StyleCI --- app/Http/Controllers/Agent/helpdesk/UserController.php | 7 +++---- app/Http/Controllers/Client/helpdesk/GuestController.php | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Agent/helpdesk/UserController.php b/app/Http/Controllers/Agent/helpdesk/UserController.php index 362a7ddd1..9cfba99ab 100644 --- a/app/Http/Controllers/Agent/helpdesk/UserController.php +++ b/app/Http/Controllers/Agent/helpdesk/UserController.php @@ -678,14 +678,14 @@ class UserController extends Controller $code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get(); if (!count($code)) { return redirect()->back()->with(['fails' => Lang::get('lang.incorrect-country-code-error'), 'country_code_error' => 1])->withInput(); - } + } $user->country_code = $request->country_code; } $user->fill($request->except('profile_pic', 'mobile')); $user->gender = $request->input('gender'); $user->save(); if (Input::file('profile_pic')) { - // fetching picture name + // fetching picture name $name = Input::file('profile_pic')->getClientOriginalName(); // fetching upload destination path $destinationPath = 'uploads/profilepic'; @@ -702,11 +702,10 @@ class UserController extends Controller $user->mobile = null; } if ($user->save()) { - return Redirect::route('profile')->with('success', Lang::get('lang.Profile-Updated-sucessfully')); + return Redirect::route('profile')->with('success', Lang::get('lang.Profile-Updated-sucessfully')); } else { return Redirect::route('profile')->with('fails', Lang::get('lang.Profile-Updated-sucessfully')); } - } catch (Exception $e) { return Redirect::route('profile')->with('fails', $e->getMessage()); } diff --git a/app/Http/Controllers/Client/helpdesk/GuestController.php b/app/Http/Controllers/Client/helpdesk/GuestController.php index 2ba461c70..5be2e258c 100644 --- a/app/Http/Controllers/Client/helpdesk/GuestController.php +++ b/app/Http/Controllers/Client/helpdesk/GuestController.php @@ -89,14 +89,14 @@ class GuestController extends Controller $code = CountryCode::select('phonecode')->where('phonecode', '=', $request->get('country_code'))->get(); if (!count($code)) { return redirect()->back()->with(['fails' => Lang::get('lang.incorrect-country-code-error'), 'country_code_error' => 1])->withInput(); - } + } $user->country_code = $request->country_code; } $user->fill($request->except('profile_pic', 'mobile')); $user->gender = $request->input('gender'); $user->save(); if (Input::file('profile_pic')) { - // fetching picture name + // fetching picture name $name = Input::file('profile_pic')->getClientOriginalName(); // fetching upload destination path $destinationPath = 'uploads/profilepic'; @@ -113,11 +113,10 @@ class GuestController extends Controller $user->mobile = null; } if ($user->save()) { - return redirect()->back()->with('success', Lang::get('lang.Profile-Updated-sucessfully')); + return redirect()->back()->with('success', Lang::get('lang.Profile-Updated-sucessfully')); } else { return redirect()->back()->route('profile')->with('fails', Lang::get('lang.Profile-Updated-sucessfully')); } - } catch (Exception $e) { return redirect()->back()->route('profile')->with('fails', $e->getMessage()); }