I want to update a row on my table with this query builder.
$new_item = DB::table('peminjams')
->where('id', $dipinjam->id_peminjam)
->update([
'nama' => $request->nama,
'cp' => $request->cp,
'jaminan' => $request->jaminan
]);
when I dd($new_item) it return false, the item did not update.
I still don't know why it failed since its only gives an boolean value.
->where('id', $dipinjam->id_peminjam)->first()whether it returns any value. then check the request values.$guardedproperty, because if they are, they won't be mass assignable. Or if you're using$fillableinstead, make sure those attributes are in there.