app/Http/Controllers/UserController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $user = User::find($id);
        $user->first_name = $request->input('first_name');
        $user->middle_name = $request->input('middle_name');
        $user->last_name = $request->input('last_name');
        $user->username = $request->input('username');
        $user->email = $request->input('email');
        $user->phone_number = $request->input('phone_number');
        $user->date_of_birth = $request->input('date_of_birth');
        $user->place_of_birth = $request->input('place_of_birth');
        $user->school_attended = $request->input('school_attended');
        $user->year_completed = $request->input('year_completed');
        $user->pin = $request->input('pin');
        $user->qualification = $request->input('qualification');
        $user->document = $request->input('document');
        $user->save();
        toastr()->success('Profile Updated');
        return back();
    }
public function update ( Request $ request , $ id ) { $ user = User :: find ( $ id ) ; $ user -> first_name = $ request -> input ( 'first_name' ) ; $ user -> middle_name = $ request -> input ( 'middle_name' ) ; $ user -> last_name = $ request -> input ( 'last_name' ) ; $ user -> username = $ request -> input ( 'username' ) ; $ user -> email = $ request -> input ( 'email' ) ; $ user -> phone_number = $ request -> input ( 'phone_number' ) ; $ user -> date_of_birth = $ request -> input ( 'date_of_birth' ) ; $ user -> place_of_birth = $ request -> input ( 'place_of_birth' ) ; $ user -> school_attended = $ request -> input ( 'school_attended' ) ; $ user -> year_completed = $ request -> input ( 'year_completed' ) ; $ user -> pin = $ request -> input ( 'pin' ) ; $ user -> qualification = $ request -> input ( 'qualification' ) ; $ user -> document = $ request -> input ( 'document' ) ; $ user -> save ( ) ; toastr ( ) -> success ( 'Profile Updated' ) ; return back ( ) ; }
Update the specified resource in storage.
Update the specified resource in storage .