mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
12 lines
No EOL
607 B
Markdown
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. |