1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/content/tips/you-can-add-the-prunable-trait-to-soft-delete-models-from-the-database-but-only-remove-them-permanently-after-a-few-days.md
2021-11-12 18:43:31 +01:00

11 lines
No EOL
678 B
Markdown

---
title: 'You can add the Prunable trait to soft-delete models from the database, but only remove them permanently after a few days'
tweet_id: '1459206733365084161'
thread_slug: weekly-thread-2021-45
author_username: Philo01
images:
- 'https://pbs.twimg.com/media/FDn5LQNWQAEllPO.jpg'
created_at: 2021-11-12T17:09:30+00:00
slug: you-can-add-the-prunable-trait-to-soft-delete-models-from-the-database-but-only-remove-them-permanently-after-a-few-days
---
Happy Monday 🙌 Let's start the week with a Laravel tip: You can use the Prunable trait to automatically remove models from your database. For example, you can permanently remove soft deleted models after a few days.