When no data is changed then laravel checks for isDirty and never executed the update query and hence model updated event is not fired. How can we manually trigger an event?
To manually trigger an event
$user = User::findOrFail($id);
$user->fill($data);
$user->save();
event('eloquent.updated: App\User', $user);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With