mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
597 B
597 B
| title | tweet_id | thread_slug | author_username | images | created_at | slug | |
|---|---|---|---|---|---|---|---|
| You can use `pluck` directly on Eloquent *classes* — no need to query the instances first | 1505269885760249857 | weekly-thread-2022-11 | ecrmnn |
|
2022-03-19T19:48:01+00:00 | you-can-use-pluck-directly-on-eloquent-classes-no-need-to-query-the-instances-first |
Calling pluck directly on a model is the most performant way to retrieve a single column from all models in Laravel. Calling get/all before pluck will read all models into memory before plucking the value.