Ad spot
Back to the Learning

Beep Beep. Subscription Required.

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.

About This Episode

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.

Ad spot
Back to Series Button