Boost Your Query Speed in Laravel with This One Simple Trick #laravel #shorts

preview_player
Показать описание
In this tutorial, we will show you how to use Laravel's pluck() method to improve query speed. We'll explain why this method is more efficient than retrieving all values, and provide code snippets to demonstrate. By the end of the tutorial, you'll know how to speed up your queries and retrieve only the specific columns you need.

📚 New Udemy Course

🧑🏼💻 Let’s plan a meeting

💌 Newsletter

🔥 Resources

#laravel #database #codewithday
Рекомендации по теме
Комментарии
Автор

Use select and put the stress on the database side. With pluck you are still getting all columns and filtering the result after the query.

JohnnyBigodes
Автор

Pluck will only allow two values to be extracted . Select has no such limit.
Pluck is only good for pulling back a list of index/value.
Behind the scenes it does make the same query as a ::select()->get()
There is no speed increase.

Joe-gepp
Автор

This is my first time hearing this pluck method, Thank you Dary :)

eslammostafa
Автор

Thanks for the information Dary. From one of your comments on this post, I see that pluck() method takes a longer time to execute so i guess I will stick to select. What do you think?

oluchukwuughagwu
Автор

How to use the pluck() method, when you're using inertia js?

dannjohnrem
Автор

Which theme are u using. It's looking very cool.

Thanks ❤

codewithsub
Автор

what vs code extension is good for both PHP and laravel, I am new

hephzisoft
Автор

It’s better to use ->select([…columns]) or even easier ->get([…columns])

eptic-c
Автор

what is the difference between this and the select method?

justinangeloperez
Автор

what deferent pluck vs ->select(...)

hkteqlp
Автор

Can you tell me what theme package is that one? I liked 😮

misterjs
Автор

Hi, dary, nice explanations. Might you by any chances have introductory tutorials for laravel?

jom
Автор

Sir, how to see the result like that? Usually I do with dd to see the result.

JS-ygez