error(); return back(); } $user = User::findOrFail($id); $user->name = $request->name; $user->email = $request->email; if($request->new_password != null && ($request->new_password == $request->confirm_password)){ $user->password = Hash::make($request->new_password); } $user->avatar_original = $request->avatar; if($user->save()){ flash(translate('Your Profile has been updated successfully!'))->success(); return back(); } flash(translate('Sorry! Something went wrong.'))->error(); return back(); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }