Jangan hubungi pengamat saat ada pembaruan model di Laravel
//Additionally, updating events are only fired when you update your
//model directly.
//That means this will fire an event:
$user = User::findOrFail($id);
$user->update($data);
//While something like this will not
User::where('id', $id)->update($data);
//or
ProductModel::query()->where('id', $product->id)
->update(['viewed' => $product->viewed + 1]);
Shadow