mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
15 lines
No EOL
539 B
Markdown
15 lines
No EOL
539 B
Markdown
---
|
|
title: 'Specify the columns you want to select when fetching all() models'
|
|
tweet_id: '1484566713303584774'
|
|
thread_slug: weekly-thread-2022-03
|
|
author_username: bhaidar
|
|
images:
|
|
- 'https://pbs.twimg.com/media/FI-ea7zUcAIf9z3.jpg'
|
|
created_at: 2022-01-21T16:41:01+00:00
|
|
slug: specify-the-columns-you-want-to-select-when-fetching-all-models
|
|
---
|
|
🌶️ #Laravel tip: You can select the columns to run when using the Model::all() method. No need for an additional select() method.
|
|
|
|
A tiny tip to always keep in mind 💡
|
|
|
|
#PHP #Developers |