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

There is firstOrNew() what works just the same and in case of not finding anything will return new instance. I don't think there is anything else that you could want instead of a newly instantiated model in this situation, correct?

Last updated 1 year ago.
0

Cool, that is true. I didn't know about firstOrNew but found it now. Thank you so much.

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

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.