Need Assistance?

support@tutorialshub.in

Eloquent ORM Fundamentals

Soft Deletes (Trash & Restore)

ADVERTISEMENT
Laravel Free Lesson
5 min read
ADVERTISEMENT

Adding the SoftDeletes trait (and $table->softDeletes(); in your migration) sets a deleted_at timestamp instead of permanently erasing rows—letting you restore accidentally deleted records with $post->restore().

ADVERTISEMENT
Hi, I'm Tuby! Here to help you