Support the ongoing development of Laravel.io →
posted 9 years ago
Requests
Last updated 1 year ago.
0

Is there any row that satisfies the where condition? If not, your query will return null and you cannot retrieve the id property. Anway you don't need get() if you want to use first().

0

Thanks... Don't know how I could have missed this :P

0

Sign in to participate in this thread!

Eventy

Your banner here too?

RoffeDH roffedh Joined 7 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.