1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 21:34:03 +00:00
laravel-tips/content/tips/wanna-update-a-set-of-eloquent-models-and-have-the-change-updated-in-the-database-and-in-your-in-memory-instances-but-dont-wanna-incur-a-database-query-for-each-model.md
2021-04-07 20:16:47 +02:00

12 lines
No EOL
607 B
Markdown

---
title: 'Wanna update a set of Eloquent models and have the change updated in the database and in your in-memory instances, but don''t wanna incur a database query for *each* model?'
tweet_id: '1253524892055560193'
thread_slug: 1-rt-1-tip
author_username: timacdonald87
images:
- 'https://pbs.twimg.com/media/EWVoC3jVcAEg0JX.jpg'
created_at: 2020-04-24T03:23:18+00:00
slug: wanna-update-a-set-of-eloquent-models-and-have-the-change-updated-in-the-database-and-in-your-in-memory-instances-but-dont-wanna-incur-a-database-query-for-each-model
---
Custom collections got you sorted. Love these methods.