Today I was trying to copy some data from one application to another application. The Data has some nested relationships so I created a custom feature to fetch the data using Apis and insert them one by one into my destination application. My problem while inserting the data was, there was an observer is set to File.php (for example) model that was running run logic to upload the incoming file to AWS s3 Cloude storage. But I am not really uploading anything while inserting the data. So, I want to stop the Observer from running the functionality while I was running my custom feature. While looking for some solution to my problem I came to a solution that I would like to share with you. File::unsetEventDispatcher(); I used this function call before running the logic only once and my observer stopped executing the code on Create and Update model event. You can also use the same code to stop the other event from executing while running some logic. You can get all the event displachers and ...