Let's learn this wonderful feature. You found this wonderful resource https://www.youtube.com/watch?v=557_IL3d9V8 Let's assume that you have some old recordings that you want to delete from the database. First we go to the Model in which we want to implement this feature and use Prunable subMonth())->whereNull('email_verified_at'); }}
Here we see the pruning function and when I use it in the Model, we explain what we want to do after deleting the records protected function pruning() { echo 'Pruning '.
Let's move to Mass Pruning, which deletes records once, but there is a flaw in it nor will the deleting and deleted model events be dispatched.