public function updateAccount(Request $request)
    {
        $this->validator($request->all())->validate();

        $user = Auth::user();
        $user->name = $request->input('name');
        $user->email = $request->input('email');

        if ($request->input('password') !== null) {
            $user->password = bcrypt($request->input('password'));
        }

        $user->save();

        return redirect()
            ->route('voyager-frontend.account')
            ->with([
                'message' => __('Account Updated'),
                'alert-type' => 'success',
            ]);
    }
public function updateAccount(Request $request)
    {
        $this->validator($request->all())->validate();

        $user = Auth::user();
        $user->name = $request->input('name');
        $user->email = $request->input('email');

        if ($request->input('password') !== null) {
            $user->password = bcrypt($request->input('password'));
        }

        $user->save();

        return redirect()
            ->route('voyager-frontend.account')
            ->with([
                'message' => __('Account Updated'),
                'alert-type' => 'success',
            ]);
    }
public function updateAccount ( Request $ request ) { $ this -> validator ( $ request -> all ( ) ) -> validate ( ) ; $ user = Auth :: user ( ) ; $ user -> name = $ request -> input ( 'name' ) ; $ user -> email = $ request -> input ( 'email' ) ; if ( $ request -> input ( 'password' ) !== null ) { $ user -> password = bcrypt ( $ request -> input ( 'password' ) ) ; } $ user -> save ( ) ; return redirect ( ) -> route ( 'voyager-frontend.account' ) -> with ( [ 'message' => __ ( 'Account Updated' ) , 'alert-type' => 'success' , ] ) ; }
Update User Account

@param \Illuminate\Http\Request $request

@return \Illuminate\Http\RedirectResponse
Update User Account