I believe this is by far the best laravel channel on KZbin. Correct me if I'm wrong.
@unarmedwombat3 жыл бұрын
Possibly the single most useful tip I've seen this year. Thanks Povilas.
@BsiennKhan3 жыл бұрын
All of this spesific talk was music for my ears. I love tips on performance tuning, not only performance wise, it also helps you to be a better architect or engineer by following patterns AND improving cognative skills for future projects.
@obikwelukyrian68483 жыл бұрын
Watching your videos has made me an optimization freak tbh. And I'm not complaining 😊
@Tooltrocity3 жыл бұрын
This is a great video, I love learning performance stuff like this. It's the nuts and bolts of a tool that people don't talk about often enough. Please make more videos like this!
@LeonelViera3 жыл бұрын
Nice that you elaborate your thinking process
@irvingviveros93143 жыл бұрын
New video = instant like! Thank you!
@edsontomas8344 Жыл бұрын
Keep dropping them gems. Thank you
@rafa.alcantara3 жыл бұрын
Povilas GOOD JOB, getting better day after day, Thanks for your incredible amount of work!
@mikaelDzp7 ай бұрын
thank you! you deserve more views !
@natenatters2 жыл бұрын
Nice! Also, like you said at the end about caching, sometimes thats the best solution. You can use the existing logic and set an identity column inside of the User updating model event, then you bypass the need for an accessor.
@jacquesmatike92893 жыл бұрын
That's a huge optimization ! Thanks !!
@jamzykimani Жыл бұрын
Awesome video👏👏 this plus the laravel-news article feels like a level up for me... So much actionable knowledge!!!
@ChangeYourLifeForever3 жыл бұрын
WOOW very intersting , we need more of those videos plz ( explain for us the eager VS normal ) loading data
@sachinvishwakarma2903 жыл бұрын
Great and very helpful all your laravel video thanks 👍
@abrpp3 жыл бұрын
Always on point. Thank you!
@leydergananbueno54663 жыл бұрын
Su canal es el mejor, he aprendido mucho de usted ¡muchas gracias! buen contenido
@intipontt74903 жыл бұрын
I'm sure there's a perfectly reasonable sql query that returns the same results. This is a perfect example of when NOT to use Eloquent.
@Khalyomede3 жыл бұрын
I completely agree with you. I recently found out when using "with('relation')", Eloquent will not perform an inner or left join, it will make a second "select ... where parent_relation in (all ids of parent_relation)", which for me was counter intuitive at first, but in the end to be able to have such a powerful chainable language you need to make some tradeoffs I guess. It still does the job pretty well to have a readable code!
@sauerkrautlanguage3 жыл бұрын
My first thought was to make a view in the DB lmao
@devendergupta_official3 жыл бұрын
A very good lesson!
@ahanafi-id3 жыл бұрын
Great Video, thanks
@mohammadrezaarab7890 Жыл бұрын
It was really helpful. thanks
@Shez-dc3fn3 жыл бұрын
whats baffling me is he does select id from users but in attr he uses $this->name which i assume is an attr of that table.. :/ this name will always be null/empty since its not selected
@07Weka3 жыл бұрын
He discussed and solved that in the video :/
@martinfeldman73402 жыл бұрын
How can I add this video to some permanent list ? This is beyond excellent. Thank you so much Povilas!
@shahsawoodshinwari11 ай бұрын
When I have to choose between a method on eloquent and an accessor, i check if there is any query launched to db, if yes, then it is definetly not an accessor as accessors are loaded on model load, while methods don't.
@alexandrelima58863 жыл бұрын
Great approach! Thx
@jetferret3 жыл бұрын
Thank you so much for this video. Fantastic example how Laravel devs abuse Models nowdays.
@martinlionel74873 жыл бұрын
Good video. The most erreur is : use trust orm and don't know how bdd work
@murr35403 жыл бұрын
I have an issue, i don't know if its laravel or db issues, but if idle for a certain period of time and tried to retrieve data on the database I got like 1.5k to 3k ms , but on 3rd or 4th call its like on for 400ms, same records it was same records, and I'm using mongodb.
@TimvandenBelt3 жыл бұрын
Once again, a great and educational video! Thanks! However, a small suggestion if you wish to push performance and be more strict with how the app deals with variables (less unexpected behaviour): use identical comparison (===) where possible. I noticed that for several comparisons where it should always be a comparison between two integers, a lossy equation (==) is used.
@koldovalnya3 жыл бұрын
Thanks 4 tutorial
@MrFa3213 жыл бұрын
Which server are you using in mac for running laravel applications? Like xampp or any other?
@LaravelDaily3 жыл бұрын
Laravel valet
@darkmode4043 жыл бұрын
Thank you!
@f00n1683 жыл бұрын
Thank you 🙏🏻
@iamriwash79433 жыл бұрын
finally i got what i looking for ( thanks)😊
@AbrarAhmad-mz8vl3 жыл бұрын
So basically it is issues with queries itself, not with accessor. Is it? If I'm using just get modify date format will it perform bad too?
@hasanbaig15402 жыл бұрын
That's really important topic to follow in development. If you have the right tool then task seems more interesting to do. I haven't found the name of this debugging tool in description please share the link.
@LaravelDaily2 жыл бұрын
Composer require barryvdh/laravel-debugbar, also Laravel telescope and Spatie Rsy - those are the tools
@demeja163 жыл бұрын
It is so cool, thank you for this video!:)
@technical1573 жыл бұрын
very interesting. thx
@MrJoboski2 жыл бұрын
Amazing!
@GergelyCsermely3 жыл бұрын
Excellent. Could You please link the Ray setup video? If I'm not mistaken You have a nice presentation.
@LaravelDaily3 жыл бұрын
kzbin.info/www/bejne/pGXTfquvdr2Yp7s
@GergelyCsermely3 жыл бұрын
@@LaravelDaily Thanks
@mohammadalisadeghi-q4j5 ай бұрын
awesome ❤
@p30mehrdad3 жыл бұрын
Thanks
@ricko133 жыл бұрын
nuostabus, plojimai!
@mikegodz3 жыл бұрын
Great video! Sometimes there's no reason not to do what the DB is designed to do. On the other hand, there are situation like the following: suppose you have a Posts/Comments project, and you want to show all the comments of a user, but visually divided by post. This is not a "SQL-grouping", cause you don't need to use some aggregate function on the data, but just to have them organized by post. On your opinion, what's a good way to handle these data? I am going with a foreach and an associative array, but doesn't feel right...
@LaravelDaily3 жыл бұрын
Why is it not SQL grouping? When doing the query, you group by post_id, and then in the Blade do foreach ($post) -> foreach ($post->comments) etc.
@mikegodz3 жыл бұрын
Because when you group by post_id (in SQL syntax) you aggregate the results using count, sum, etc. That's what I mean with "SQL grouping". Are you referring to using the groupBy function of Laravel?
@LaravelDaily3 жыл бұрын
Yes I thought so, actually thinking about it, it's best to group in collection then, so something like ->get()->keyBy(post_id) or something, don't remember the exact collection method.
@mikegodz3 жыл бұрын
@@LaravelDaily Didn't know about the keyBy method. I'll dive into it, thanks!
@hungrybox21003 жыл бұрын
Can you please make a video on recursive function when category needs to be display in hierarchy? Because it causes performance problem
@LaravelDaily3 жыл бұрын
This video should help: kzbin.info/www/bejne/a6SQkIaki9FgZ8k
@kkamarada43 жыл бұрын
Nice work o/
@novichkovv2 жыл бұрын
Why don't you use laravel ide helper? My perfectionist eyes are bleeding seeing those inspector warnings. But besides aesthetic aspect, ide helper really improves the quality of code by avoiding typos and development speed by autocomplete. I always try to make each php file having green inspector mark, thus, especially if you use type hints, return types and declare strict, green mark says that everything here is correct and you need to pay attention only to the logic
@teb16873 жыл бұрын
why are comments being deleted?
@LaravelDaily3 жыл бұрын
I haven't deleted any comments, except for obvious spam bots
@teb16873 жыл бұрын
@@LaravelDaily ok must be some yt issue
@alexaverkiyev90993 жыл бұрын
The approach of original code was breaking single responsibility principle and was wrong from the very beginning
@kieronwiltshire17012 жыл бұрын
Thing is... 700ms is ridiculous for a "production" ready framework
@gianfrancobriones3 жыл бұрын
I am guilty
@david-kahly2 жыл бұрын
not a good example at all. the code and schema should be refactored.
@dokumentalny Жыл бұрын
Names of this metod is a straight from hell 😅 is_ghost - rally?!?