Generally, Eloquent "tricks" are the most often things people need in Laravel. So want to become an expert? I have a 4-hour course "Eloquent: Expert Level": laraveldaily.teachable.com/p/laravel-eloquent-expert-level
@J2TeamNNL
4 жыл бұрын
I think everyone should buy this. I am a teacher, but I think I must learn a lot to be an expert
@asifm3520
4 жыл бұрын
Really appreciate your efforts to explain the concept with real world examples in easy way.
@renwar
4 жыл бұрын
Thanks for the tip. I always doubted subquery performance but this explains well.
@MuhammadImran-vh9er
4 жыл бұрын
As always it's helpful and i love your way of teaching and explaining things...
@just_the_job
4 жыл бұрын
Your tutorials are amazing.
@randomguy5922
4 жыл бұрын
I thinks its very helpful.
@shishirkumarsky
2 жыл бұрын
How to show latest post when created on top, and when somebody's add comment on top, together? Like if somebody created post that comes on top, or when some comment comes up on old post it comes on top?
@aisalen
4 жыл бұрын
As always, nice tips. Thanks.
@francescoleto2823
4 жыл бұрын
I love your tips
@seanglendinning3281
4 жыл бұрын
What is the difference in memory if, when loading the relationship, but instead of select *, you defined only returning the created_at field? It wouldn't change the query time, but curious about the memory requirement.
@PovilasKorop
4 жыл бұрын
Memory should be lower, indeed. For exact number, you should experiment.
@tannercampbell
4 жыл бұрын
Using the addSelect approach if you were add another field from related table would you just add that in the select or repeat the addSelect for the other field? I never new about this method, I need to do some research.
@PovilasKorop
4 жыл бұрын
I haven't tried it myself, and I don't see this case in documentation either, but I assume, as it is a subselect, you add multiple addSelect statements and each of them creates a subquery.
@ShibbirAhmedRaihan
3 жыл бұрын
I am facing a problem in subquery. I want to order by subquery by many many relationship. but I can't figure out how can write whereColumn query in addSelect. Can you please help me?
@ahmedkamel7909
4 жыл бұрын
great as usual thank u
@J2TeamNNL
4 жыл бұрын
I just use this like an hour ago. But I have a questions about sum the column in the Eloquent. Like I have a few company, company have a lot of employees, and I want to sum salary group by each company. Can you help me with this. I have solve the problem but with sql raw (subquery)
@PovilasKorop
4 жыл бұрын
Nothing wrong with SQL raw queries in complicated cases.
@neerajsinghtangariya2587
4 жыл бұрын
sir in subquery you use a addSelect(['lastComment']) => this attribute 'lastComment' name can be anything? am I right?
Пікірлер: 20