'Error while updating data from Database using Laravel 8

I was trying to update a record that comes from database. When I clicked the update button, it was ended up by error as shown in pictures

enter image description here

Here is my controller :

public function edit($id)
    {
        
        $data = AnggotaModel::find($id)->with('relasitotime')->first();
        $time = TimeModel::all();
        return view('jemaat.tampiljemaat',compact('data','time'));
    }

public function update(Request $request, $id)
    {
        $data = AnggotaModel::find($id)->with('relasitotime')->first();
        $data -> update($request->all());
        return redirect()->route('jemaat')->with('success','Data Anggota Berhasil diupdate');
    }

What should I do to fix that error?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source