mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
518 B
518 B
| title | tweet_id | thread_slug | author_username | images | created_at | slug | |
|---|---|---|---|---|---|---|---|
| Make models prunable to periodically delete them from the DB | 1484566701089849344 | weekly-thread-2022-03 | mmartin_joo |
|
2022-01-21T16:40:58+00:00 | make-models-prunable-to-periodically-delete-them-from-the-db |
💡#Laravel Eloquent Tip
Laravel 8 introduced the Prunable trait. You can use it to delete old models on a scheduled basis.
You don't need to write custom commands anymore: