Back to the Learning

Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.
Sign up to get full access or log in to your account and sit back.

Confusing Errors and Solutions

Episode 82 Run Time 11:08

What happens if a "best reply" is deleted by its owner? Shouldn't we update the owning thread to nullify the best_reply_id column? Otherwise, that column will refer to a reply that doesn't exist. In this episode, we'll add a database constraint to perform this update automatically. However, as we implement it, we'll encounter a few confusing issues that aren't so easy to debug.

View the source code for this episode on GitHub.

Publish Date: October 3, 2017