Learned the N+1 problem today got the solution today i guess i am lucky!
Amazing feature!!! Great video as always! Proud to be a laracast member since 2022.
I can't believe I was writing core php for 3 years before a colleague recommended Laravel to me, best decision ever
Laravel is on fire this time around and I am glad that PHP was my first language to learn and I am going to depth with it
Cool feature and cool video! But, to force eager loading in the provider is near to a suicide, or at least - shot in the leg. And, I think, the feature is for (very) small projects. I can imagine what amount of memory will be used if it tries to eager loads 1 page with 25 models with 100+ columns in the DB and with 5-10+ 1:m relations to models with the same size.
I like the way EFCore does it, because the names of the relationships are strongly typed, so no errors.
Or don't be a SQL-phobe and get it done with one query, especially if caching is not an option and you need all that on first page every user opens. And that where id in(1, 2, .., 9999) might become problematic when trying to sqeeze out all the performance from database one can get.
This is a valuable feature. In each part of the video you presented this in a easy way.
Is this going to load all relationships of the model (everything), or only the ones, that are going to be used at that soecific block of code?
These videos are great. and timing is excellent. I just jumped into Sentry and saw a bunch of N+1 problems.
The quality of videos is getting freaking high. I would say the new feature is absolutely mind-blowing.
Thanks for the video and that sounds like a great BUT also a dangerous feature to me, if not used carefully! Imagine a company has 1000 products, when I load a company to know its name, I don't want to load 1000 product with it.
What a video! What a voice! Thank you, it was really helpful
Thanks. In my existing projects, does it conflict with where I already coded to eager load? Or do I have to delete all my eager loading code?
“Queries” - coming soon to a theatre near you
If we use a join instead of the load function, and then create an array to store only the column data we need — is that a good approach?
I love everything here, just one thing. Maybe the audio is out of sync with the video?
I love this so much. Very simple to understand and very simple to implement.
nice, but isn't there a way to do it all in one query with some joins? and isn't that approach preferrable?
@CarlosMorales-vo5ju