I have to update some records but it doesn't work properly. Someone know what to do?
$dog = DB::table('dogs')
->update($data)
->where('id', $id);
return response()->json($dog); })
Call where
before update
, e.g. :
$dog = DB::table('dogs')->where('id', $id)->update($data);