Merge pull request #259 from ladybirdweb/analysis-8AbLMP
Applied fixes from StyleCI
This commit is contained in:
@@ -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';
|
||||
@@ -706,7 +706,6 @@ class UserController extends Controller
|
||||
} else {
|
||||
return Redirect::route('profile')->with('fails', Lang::get('lang.Profile-Updated-sucessfully'));
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
return Redirect::route('profile')->with('fails', $e->getMessage());
|
||||
}
|
||||
|
@@ -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';
|
||||
@@ -117,7 +117,6 @@ class GuestController extends Controller
|
||||
} 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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user