← All tasks
🧮
Programming Intermediate

Write an updateOrCreate Query

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the Eloquent expression that updates a Setting's value for a given key, or creates it if the key doesn't exist yet.

Scenario

An app settings table needs to be upserted from an admin form.

Ready to try it?

Create a free account and try "Write an updateOrCreate Query" free for 7 days, no card required. Earn 90 XP and track your internship progress.

Already have an account? Sign in