I agree. Few years ago I fall in love with $with and that was a huge mistake. Now I'm never using $with and it's even better for me and my co-workers because now by just looking at query we know what exactly it will return.
You didn't mention it but when you have a "$with" property on your model, you can use ->without('xxxxx') when you specifically don't need the relationship in a particular query.
I'm sufferning form the imposter syndrom, but when i watch Your videos i actually feel good about myself since i do not make such cardinal mistakes as mentioned in this video. I do not consider myself as a programmes thou. I only work as one :)
Hi Povilas! Are you sure the cause lies in $with? I tried to reproduce this error and when using $with I get 2 queries. Could the cause lie deeper, for example in $append and some attribute that uses organisation?
It's different, it automatically loads only for APIs, as I remember. But I don't remember using it ever, for the same reason: no guarantee when it would work
"Mistakes" videos are the best!!! :) (because of new deep knowledge)
I agree. Few years ago I fall in love with $with and that was a huge mistake. Now I'm never using $with and it's even better for me and my co-workers because now by just looking at query we know what exactly it will return.
You didn't mention it but when you have a "$with" property on your model, you can use ->without('xxxxx') when you specifically don't need the relationship in a particular query.
I'm sufferning form the imposter syndrom, but when i watch Your videos i actually feel good about myself since i do not make such cardinal mistakes as mentioned in this video. I do not consider myself as a programmes thou. I only work as one :)
->random() or might be called ->inRandomOrder() is also very slow
This is great video!
Very helpful video
it is very helpful thanks
Hi Povilas! Are you sure the cause lies in $with? I tried to reproduce this error and when using $with I get 2 queries. Could the cause lie deeper, for example in $append and some attribute that uses organisation?
Not sure now, it's been a while since this video, don't remember its details now
Great video.
Great video
Does Model::with have the same effect? Should we avoid using those relationships??
No, it's just about defining $with globally.
How can I contact u I want to ask a few questions
povilas@laraveldaily.com but I don't have much free time, only quick questions please
IU won't name them, but their code has Webkul written all over it 😅
❤
What about $appends, is it the same case as $with or has another benefit?
It's different, it automatically loads only for APIs, as I remember. But I don't remember using it ever, for the same reason: no guarantee when it would work
Lol, I know the CRM.
go on
@@weeb3277 just look for Laravel Open Source CRM it will be in first 3 results. Check the demo.