Summary
I recently saw a tweet by Philo Hermans which states the slick use of a recently added Prunable trait in Laravel 8.x Essentially, from the version 8.50.0, Laravel comes with a Prunable trait, which is when added to the models, allows to remove obsolete model records. Using Prunable trait The pruning method Using Prunable trait For this, all you need is to add the Illuminate\Database\Eloquent\Prunable trait to the model that you want to make prunable. Next, you’ll need to implement the prunable...