← All tasks
🔍
Programming Intermediate

Fix a Relationship Defined on the Wrong Side

⏱ 5 min ⭐ 120 XP 🔁 3 attempts allowed

What you'll do

Find the line where the relationship method is backwards for the schema.

Scenario

The comments table has a post_id foreign key, but calling $comment->post throws an error.

Ready to try it?

Create a free account and try "Fix a Relationship Defined on the Wrong Side" free for 7 days, no card required. Earn 120 XP and track your internship progress.

Already have an account? Sign in