← All tasks
🧮
Programming Beginner

Write a pluck() Query for a Dropdown

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the Eloquent expression that returns category names keyed by their id, ready for a select dropdown.

Scenario

A post creation form needs an id => name array to populate a category select input.

Ready to try it?

Create a free account and subscribe to take "Write a pluck() Query for a Dropdown". Earn 90 XP and track your internship progress.

Already have an account? Sign in