app/Http/Controllers/UserController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\User  $user
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(UserRequest $request, User $user)
    {
        $this->authorize('update', $user);
        $user->update($request->validated());
        $redirect = (Auth::user()->id == $user->id && !$user->isAdmin()) ? 'dashboard' : 'users.index';
        $path = redirect_user_lang($user->lang, $redirect);
        return redirect($path)->with('status', __('messages.user_update_status'));
    }
public function update ( UserRequest $ request , User $ user ) { $ this -> authorize ( 'update' , $ user ) ; $ user -> update ( $ request -> validated ( ) ) ; $ redirect = ( Auth :: user ( ) -> id == $ user -> id && ! $ user -> isAdmin ( ) ) ? 'dashboard' : 'users.index' ; $ path = redirect_user_lang ( $ user -> lang , $ redirect ) ; return redirect ( $ path ) -> with ( 'status' , __ ( 'messages.user_update_status' ) ) ; }
Update the specified resource in storage.
Update the specified resource in storage .