Yeah, memory and time depend on the server's configuration. I'm running php locally on a non-server machine so my times were higher. You can take the number of models/amounts of queries done as a metric but to measure out performance, you need to compare against your own baseline.
Thanks for this video - very good explanation. A question: How will Eloquent compete with raw SQL ? Is Eloquent having an effect on the databases' own uptimization in a good/bad way ?
He already hinted about this explaining a pull request that used query builder, same thing as raw query. Raw query will always be performant and memory efficient than eloquent, Because models does many things in backend like firing events automatically, changing columns on runtime getter and setters. On top of this it returns collection instead of arrays, so yeah eloquent does a lot, and thats the plus point actually, it does alot of things that helps practically.
Hi there, I got this one problem: Got Members table,day table and their pivot table The problem I'm facing is that I want to select all members that are not found in pivot (like to put members in select to add them to pivot and avoid getting already added members in that pivot in the select list) I usually solve it by getting the day::with('member) and members::all() and find diff with some loops but it takes so much resource any easier way to do that?
@@LaravelDaily Thank you. I have another question: Do you have any video teaching how to use external storage, like Google Drive, to upload files from Laravel project?
Many people are faced with the problem of locking tables in queues through the database. How to avoid a race condition and get rid of the problem "Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"?
It's not about being fair or being featured, it's not a competition. It's about value to the audience, so mentioning such possible solution is value to the audience.
selecting columns on relationship can be done pretty much simple :
->with('categories:id,name')
Big fan!
Please don't ever stop making Laravel videos ♥️🙏🏽
Yeah, memory and time depend on the server's configuration. I'm running php locally on a non-server machine so my times were higher. You can take the number of models/amounts of queries done as a metric but to measure out performance, you need to compare against your own baseline.
Nice video again. That trick with the DB::table()->get() instead of the Mode::get() helped me to answer my question from yesterday :)
Thank you for all the tutorials that Mizari helped me a lot in my work progress. Thank you very much
thank you so.much for your efforts your vidoes are very heplfull
your video is very very nice .and a lot of learning in your videos get it thank you so much sir.
Thanks for this video - very good explanation. A question: How will Eloquent compete with raw SQL ? Is Eloquent having an effect on the databases' own uptimization in a good/bad way ?
He already hinted about this explaining a pull request that used query builder, same thing as raw query.
Raw query will always be performant and memory efficient than eloquent, Because models does many things in backend like firing events automatically, changing columns on runtime getter and setters. On top of this it returns collection instead of arrays, so yeah eloquent does a lot, and thats the plus point actually, it does alot of things that helps practically.
Thanks
Sir, would it be possible to make a multiple authentication guard setup with Laravel passport for API authentication.
small request plz( laravel 8 google map event how to pic point for scartch code )
Hi there,
I got this one problem:
Got Members table,day table and their pivot table
The problem I'm facing is that I want to select all members that are not found in pivot (like to put members in select to add them to pivot and avoid getting already added members in that pivot in the select list)
I usually solve it by getting the day::with('member) and members::all() and find diff with some loops but it takes so much resource any easier way to do that?
Search for whereDoesntHave method in the docs or google
Or maybe even just doesntHave()
Thanks very much...you are blessed
♥️
could you please make video on websocket ?
It's planned but later in 2021
Do I have to create Service folder manually?
Yes
@@LaravelDaily Thank you. I have another question: Do you have any video teaching how to use external storage, like Google Drive, to upload files from Laravel project?
Every external storage source is different. I don't have anything about Google drive, but I have something on Amazon s3, please search the channel
@@LaravelDaily Will do. Thank you very much sir.
Many people are faced with the problem of locking tables in queues through the database. How to avoid a race condition and get rid of the problem "Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"?
Googled and found a few articles, may be relevant: freek.dev/1087-breaking-laravels-firstorcreate-using-race-conditions
@@LaravelDaily thx i will read this
windows 7 php7.4 laravel 8.54 empty application without queries use 16Mb but same app on linux use ~5Mb
You specifically specified that caching was not allowed, so featuring a pull request with caching is unfair to one who followed the rules.
It's not about being fair or being featured, it's not a competition. It's about value to the audience, so mentioning such possible solution is value to the audience.
Min. 7:46,
->with('category',fn($query) => $query->select('id','name'))
Gives me a ParseError:
syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'
Php 7.4+
@@LaravelDaily Thanks!!!
first