I’m an aspiring junior developer who just finished my studies and am focusing on the Laravel + Inertia + Vue.js stack. I've learned so much from your videos-thank you very much! I really appreciate your junior code reviews.
One of the things I learned from you a few months ago is the importance of including a README file and other stuff. I’m currently working on a project, and once it’s done, I’d like to have you review my project if possible so I can keep improving my skills for future projects.
Sure, if I have more free time then, and if it's valuable for others. And you would probably need to wait for at least a few weeks for the review. Email me povilas@laraveldaily.com then.
Great video as always. One thing about using @class directive, I'm using vscode and it doesn't autocomplete tailwind classes when it's inside the @class directive. And it sometimes can be annoying to type all the classes by hand. That might be why they went with that approach. To work around this, I give the classes in default html class attribute and then move it into @class directive. I can suggest this approach in case anyone else finds it annoying.
Good tips, regarding the SQL performance I rather use Query Builder than Eloquent Relations, especially in this scenario this could be a better option and such a list could be written using one Query
I completely agree that the balance could have been calculated in the query. But a lot of the time, I see that programmers only want to use SQL to fetch data, forgetting that it can also transform data as required.
Hey Povilas, Thanks for your video! I've been following your tutorials since 2019, and they've helped me a lot in improving code quality and optimization. If possible, could you please make a video on when developers should use raw queries versus Eloquent? While reviewing junior developers' code, I noticed they often mix raw queries with Eloquent without knowing when each approach is appropriate or what the best practices are.
There's no one-size-fits-all advice. I guess it's preferable to use Eloquent, then in some cases you may switch to Query Builder (search my video on "whereHas vs Join"), and if that doesn't work, THEN you try to switch to Raw. But this is mostly my personal opinion, other devs may have different perspective.
@@krekas I know, but some cases they use raw queries where it's possible to use eloquent or DB queries. However, for the complex reports, sometimes it's better to use raw query instead eloquent.
@mdatiqurrahman2561 for reports, you might need a lot of sql functions to get data like min, max, avg, etc. Then, without raw I don't think it's possible
Sir, is it possible to seed a particular table data in Database seeder? I mean, for example, i have subject table with some specific subjects and students table with student data like name regulation semester etc... When i run db:seed , i need to populate the student data and subject data (not random fake data) Is it possible? Apologize me i my question is wrong... Thank you.
@LaravelDaily on the N+1 queries whats the ideal number of queries that should be made to a DB so as to know when the queries are well optimized...I might have missed it
Thank you for reviewing my code and giving your precious advice. I will care on it.
I’m an aspiring junior developer who just finished my studies and am focusing on the Laravel + Inertia + Vue.js stack. I've learned so much from your videos-thank you very much! I really appreciate your junior code reviews.
Was waiting for your video all week long. Happy 40.
One of the things I learned from you a few months ago is the importance of including a README file and other stuff. I’m currently working on a project, and once it’s done, I’d like to have you review my project if possible so I can keep improving my skills for future projects.
Sure, if I have more free time then, and if it's valuable for others. And you would probably need to wait for at least a few weeks for the review. Email me povilas@laraveldaily.com then.
Thank you! Great, it is helpful for me!
Great video as always. One thing about using @class directive, I'm using vscode and it doesn't autocomplete tailwind classes when it's inside the @class directive. And it sometimes can be annoying to type all the classes by hand. That might be why they went with that approach.
To work around this, I give the classes in default html class attribute and then move it into @class directive. I can suggest this approach in case anyone else finds it annoying.
Good tips, regarding the SQL performance I rather use Query Builder than Eloquent Relations, especially in this scenario this could be a better option and such a list could be written using one Query
awesome review, very interesting and educational
Thank you!
I completely agree that the balance could have been calculated in the query.
But a lot of the time, I see that programmers only want to use SQL to fetch data, forgetting that it can also transform data as required.
Great content!
Hey Povilas,
Thanks for your video! I've been following your tutorials since 2019, and they've helped me a lot in improving code quality and optimization. If possible, could you please make a video on when developers should use raw queries versus Eloquent? While reviewing junior developers' code, I noticed they often mix raw queries with Eloquent without knowing when each approach is appropriate or what the best practices are.
When you can't get the result without basic eloquent features, then use raw. I think it's simple as that.
There's no one-size-fits-all advice. I guess it's preferable to use Eloquent, then in some cases you may switch to Query Builder (search my video on "whereHas vs Join"), and if that doesn't work, THEN you try to switch to Raw.
But this is mostly my personal opinion, other devs may have different perspective.
@@krekas I know, but some cases they use raw queries where it's possible to use eloquent or DB queries.
However, for the complex reports, sometimes it's better to use raw query instead eloquent.
@mdatiqurrahman2561 for reports, you might need a lot of sql functions to get data like min, max, avg, etc. Then, without raw I don't think it's possible
Nice video, thanks :)
I assume there was no tests.
A very simple test would have catch the factory issue.
Nope, no tests.
can u make video about stored procedure with laravel
I don't really use stored procedures so I can't make a video, sorry
Sir, is it possible to seed a particular table data in Database seeder? I mean, for example, i have subject table with some specific subjects and students table with student data like name regulation semester etc... When i run db:seed , i need to populate the student data and subject data (not random fake data) Is it possible? Apologize me i my question is wrong...
Thank you.
It's totally possible. I do something similar by seeding the data from a JSON file.
@felixmensahafedzo70 Thank you for your valuable suggestions 🙏🙏
@@earavichandran You're welcome
Yes it's surely possible, you don't have to seed fake data, you can get it from any source you want, like your own database or external files.
@LaravelDaily Thank you for the valuable information sir
@LaravelDaily on the N+1 queries whats the ideal number of queries that should be made to a DB so as to know when the queries are well optimized...I might have missed it
There's no specific number, depending on the page. The lower, the better.