When using the DB facade to perform database operations in Laravel, Eloquent ORM model events like saving
, saved
, etc., are not triggered.
If you want to avoid triggering model events in event listeners or queued tasks, aside from using Eloquent’s saveQuietly
, deleteQuietly
, and similar methods, you can directly use the DB facade to execute database operations.
This approach allows you to bypass Eloquent’s event handling when necessary.