Laravel has two timestamps on every table(created_at and updated_at). I thought it would insert created_at at insertion of new row and update updated_at at update. However what happens is that created_at field is getting an update when I update my model.
How do I alter this behavior or what method should I use to update a row and just updated_at timestamp?
Right now I use $model->save();
$point = Map::find($id);
$point->longitude = $request->longitude;
$point->latitude = $request->latitude;
$point->description = $request->description;
$point->save();
created_atto be updated on an existing model. - ceejayozsetCreatedAtAttribute($value)method? - user1669496