app/Http/Controllers/MembersController.php
/**
     * Update the specified resource in storage.
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request)
    {
        $request->validate([
            'company'=>'required',
            'surname'=>'required',
            'other_names'=>'required',
            'user_email'=>'required',
            'DOB'=>'required',
            'passport'=>'required',
            'home_location'=>'required',
            'work_location'=>'required',
            'occupation'=>'required',
            'mobile_no'=>'required',
        ]);
        $user_id = auth()->user()->id;
        $member = Member::find($user_id);
        $member->update($request->all());
        return redirect()->route('dependant.show');
    }
public function update ( Request $ request ) { $ request -> validate ( [ 'company' => 'required' , 'surname' => 'required' , 'other_names' => 'required' , 'user_email' => 'required' , 'DOB' => 'required' , 'passport' => 'required' , 'home_location' => 'required' , 'work_location' => 'required' , 'occupation' => 'required' , 'mobile_no' => 'required' , ] ) ; $ user_id = auth ( ) -> user ( ) -> id ; $ member = Member :: find ( $ user_id ) ; $ member -> update ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'dependant.show' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .