Always really good when a video is reflecting a day-to-day kind of situation at work. These decision (database structure, coding style) are happening a lot under the hood and a good developer should always address all these long-term considerations as you do here. Nice job!
@ejaadhulab89242 жыл бұрын
this is exactly what I am looking for. Thank you very much for sharing daily tips. Although the tutorial is old the content is not outdated.
@3mro_coding3 жыл бұрын
This review video didn't get what it deserves. Am sharing this to all social networks this really quality content. Thanks for sharing.
@ashrafuzzamashraf8854 Жыл бұрын
Good benchmark video. Thanks
@maiconmva4 жыл бұрын
but if you add a index key in class name column, will be much faster
@leonardoldr3 жыл бұрын
I know it's an old video, but in fact for an application that have to be maintained for a long time polymorphic seems to add the inconvenience of "guessing". Pretty much any developer knows what a foreign key is, but maybe just the advanced will realize the polymorphic. Also, would be fine to have a real-world test with the "real" database modelling with 3 tables vs 1 poly and each of them with millions of rows. But, as always very helpful, your videos are helping me a lot! :)
@maxralph012 жыл бұрын
Very informative!
@Construction-agencyCoUk4 жыл бұрын
fantastic video - thanks 🙏
@helluci6449 Жыл бұрын
6:30 also breaks the SOLID principles, right? Is there a way to prevent that?
@ahmedabdnaser15823 жыл бұрын
thank you, this video is very informative. keep going
@shire79493 жыл бұрын
Very valuable information
@Jossnaz3 жыл бұрын
I appreciate your videos. I keep thinking as well that you focus a bit too much about "shorter syntax". Just because you can mke it shorter, doesnt mean you should. Readability is king, reading the couple ifs vs that string replace? For me ifs way easier to read. As well imagine you need translations. Your ide will help you find the references. And its easy to add another if. For example i dont like laravel resources a lot either because i like to be able to search for a problematic http call in my code. If you use resource you wont find it any more. Its shorter, but at what cost?
@sonant_bwolfe4 жыл бұрын
"This table full of strings is bigger than this table full of integers, I'm not sure why when I export both as utf8 text they're the same size" :D
@cxian Жыл бұрын
What do you call on that Laravel developer console on the bottom of the page? Is that part of the Quick Panel?
@LaravelDaily Жыл бұрын
composer require barryvdh/laravel-debugbar
@cxian Жыл бұрын
@@LaravelDaily Thank you sir!
@thatsenam91834 жыл бұрын
Really Helpful
@bunwong97184 жыл бұрын
What is the name of the DEVTOOL bar under the browser?
Does having multiple foreign key fields in this case break normalisation? I mean how can the database enforce that only 1 of the fields is populated & the other 2 are null? Also, A big thanks you for your tips & knowledge sharing
@LaravelDaily2 жыл бұрын
From what I understand, yes, polymorphic relationship breaks the normalization. But normalization isn't a sacred rule, in my opinion.
@evilwizard79312 жыл бұрын
@@LaravelDaily I meant the other way, the database can enforce the relationship with the other tables, but how can the table containing multiple foreign key fields as primary relation. What is stopping a record being linked to all 3 other tables is what I'm asking I guess & has no bearing on Laravel/Eloquent. It's as sacred as SOLID, something to strive for, but don't break your back doing it, even the fundamental laws of the universe do it the easy/lazy way :)
@LaravelDaily2 жыл бұрын
Well, polymorphic relationship is NOT the database relationship, it doesn't have foreign keys or other DB level constraints. If you go for polymorphic, you kinda forget DB constraints and rely on Laravel functionality.
@nabeelyousafpasha4 жыл бұрын
Do you feel it unnecessary to query multiple times via WITH method rather than JOIN? However some may find join slower but we can manipulate data at db level in a single query using multiple tables with JOIN. DB transactions cost lesser (if i am right). What are your suggestions regarding this
@PovilasKorop4 жыл бұрын
It's a personal preference, I tend to use all Eloquent possibilities and not Query Builder with join(), whenever possible. Doing it directly with join() sometimes may be quicker, sometimes not. It depends on the situation.
@devmaster89234 жыл бұрын
how to install the bar like yours? where you can see the result?
@PovilasKorop4 жыл бұрын
It's called Laravel Debugbar, Google how to install it
@iordanistsapanidis40214 жыл бұрын
Why not use db queries?? easier with() than join() but faster
@pola5874 жыл бұрын
Not recommended for readability
@iordanistsapanidis40214 жыл бұрын
@@pola587 what can't you understand exactly??
@TheBaltLT11 ай бұрын
what value your talking head adds to this tutorial apart distraction?
@wayne_xyz11 ай бұрын
So that you can see and remember the actual human being who is making efforts to teach everyone who needs teaching. You ungrateful asshole