app/Http/Controllers/MemberController.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)
    {
        $update = Member::find($id)->update([
            'nama' =>  $request->nama,
            'alamat' =>  $request->alamat,
            'jenis_kelamin' =>  $request->jenis_kelamin,
            'tlp' => $request->tlp 
        ]);
        if($update){
            return response()->json([
                'status' => true
            ]);
        }
        else{
            return response()->json([
                'status' => false
            ]);
        }
    }
public function update ( Request $ request , $ id ) { $ update = Member :: find ( $ id ) -> update ( [ 'nama' => $ request -> nama , 'alamat' => $ request -> alamat , 'jenis_kelamin' => $ request -> jenis_kelamin , 'tlp' => $ request -> tlp ] ) ; if ( $ update ) { return response ( ) -> json ( [ 'status' => true ] ) ; } else { return response ( ) -> json ( [ 'status' => false ] ) ; } }
Update the specified resource in storage.
Update the specified resource in storage .