Junior Code Review: Laravel Routes, Middleware, Validation and more

  Рет қаралды 263,184

Laravel Daily

Laravel Daily

Күн бұрын

Пікірлер: 419
@mathiasdesouza
@mathiasdesouza 3 жыл бұрын
"Juniors don't be afraid to show your code. Seniors don't attack the juniors that the code is bad. We all start somewhere."
@JimOHalloran
@JimOHalloran 3 жыл бұрын
So much this... I've been doing Software Dev for 26 years, PHP for 16 years, and Laravel for the last 2.5, and I learned something from this video. So I'd also add "Seniors, don't assume you know everything, and your way is the only way."
@Towzlie
@Towzlie 3 жыл бұрын
@@JimOHalloran Every day there is new oppurtunities to learn things, we shoudn't feel ashamed to do so !
@ryanbeatbox
@ryanbeatbox 2 жыл бұрын
Absolutely, thankfully my team lead adopts this mentality as well. Such a good quality to have in leadership and development in general.
@DuilioPalacios
@DuilioPalacios 3 жыл бұрын
The delete action using "GET" instead of "DELETE" might expose the user to CSRF attacks. That one should be changed for security. (I hope this observation can be useful for someone).
@themostnonchalant
@themostnonchalant 3 жыл бұрын
buen dato , maestro.
@digitalminister5687
@digitalminister5687 3 жыл бұрын
3:54 he mentioned it
@duiliopalacios1777
@duiliopalacios1777 3 жыл бұрын
​@@digitalminister5687 Yes, I know, I just wanted to point out the potential security issue, that's all :) I also record videos and it's challenging if not impossible to cover everything in one video no matter the length.
@JohnSmith-zl8rz
@JohnSmith-zl8rz 3 жыл бұрын
styde needs updated videos on laravel 8 ;)
@DuilioPalacios
@DuilioPalacios 3 жыл бұрын
John Smith what does that have to do with this video? And FYI I do have tons of videos in L8, just not in my KZbin channel.
@ShekenZZZ
@ShekenZZZ 3 жыл бұрын
Yes ! Please ! More code reviews videos ! As a junior I can't state how valuable this is. Thanks for everything !
@EsronDtamar
@EsronDtamar 3 жыл бұрын
I liked the video format. And today I noticed that I'm not a junior anymore.
@marcusaureliusregulus2833
@marcusaureliusregulus2833 3 жыл бұрын
Lmao
@11r3start11
@11r3start11 3 жыл бұрын
Im experienced web developer, but a c# one. Have no idea why this video appears in my recommendation, but it's ASWESOME. For me It was a good overview of PHP/Laravel development). Without any experience I understood 100% of it! Thanks.
@gyohza
@gyohza 3 жыл бұрын
Omfg. This is like those "very satisfactory" videos with people slicing colored clay, but with coding. Such a rewarding feeling to watch.
@justnothing7822
@justnothing7822 3 жыл бұрын
Your one video > Tones of Learn laravel from strach for Inermediates.Thank you Sir, have a better life everyday.
@rikiamaru
@rikiamaru 3 жыл бұрын
i agree with you on this statement "as junior dont be afraid to make mistake (but take responsibilty on that)" "as senior dont attack your junior (we have to start somewhere right)" huge respect to you!!
@gdog6036
@gdog6036 3 жыл бұрын
The command in PHPStorm to highlight the next occurrence of a word is Ctrl+G on Mac and Alt-J on windows. On vscode it’s ctrl+D. Rather than moving the mouse and highlighting line by line Great content!
@tarangpanchal4424
@tarangpanchal4424 3 жыл бұрын
This means a lot of helpful to jr. developers to learn. I have seen many videos. many of video creators Assumes that you were aware about the mistakes that users do. but actually the fresher or junior developer wasn't aware of that. *And this is really fantastic video to identify mistakes and correct them*.
@0xshashwat
@0xshashwat 3 жыл бұрын
That $request->validated() and $fillable combination was on another level. Got to learn something new 😄
@0xshashwat
@0xshashwat 2 жыл бұрын
@@mbparvezme Validation messages can be set in the Request Class created using " artisan make:request" command. Laravel will take care of the rest. And for the frontend you do everything same as before. Also check out the laravel documentation on "The Basic > Request" section it explains it beautifully. You can also use custom Rules inside the request class instead of if statements in the controller. 😉
@mbparvezme
@mbparvezme 2 жыл бұрын
​@@0xshashwat Thank you for your reply. It was my fault. I just forgot to include the "Accept: application/json" header in the request. That is why it send me a response with a redirect (back). But with the appropriate header, I got the error message.
@SunilKumawatbfcj
@SunilKumawatbfcj 3 жыл бұрын
Hello sir You are the most humble and kind person in the region. You always appreciate others for working hard instead of dominating them for mistakes, and helping them grow each time. I think your contribution to this growth of laravel is remarkable. Help is only help, whatever form it may be given, and I am grateful for your efforts and love.
@nagaindra2323
@nagaindra2323 3 жыл бұрын
I have completed my last project fully with query builder only. This video help me to under stand the standard of code. Thank you so much sir. You videos help me lot
@chaosthelegend6338
@chaosthelegend6338 3 жыл бұрын
I've never written a line in PHP but still watched till the end, you never know when you gonna need this. Great review, very satisfactory.
@muhammadhashiranwaar3239
@muhammadhashiranwaar3239 3 жыл бұрын
i just watched till 1:13 and i start loving you.... This is how juniors shud be treated... Love You Sir.
@camilorojas3261
@camilorojas3261 2 жыл бұрын
Eres grande amigo. No porque sepas mucho, sino por darte el tiempo de ayudar a los que saben menos. Saludos desde Chile.
@randomguy5922
@randomguy5922 3 жыл бұрын
Very nice sir, most of the tutorials on net only deals with beginners things, ie how to start or more advance things, but you literally deal with minor problems which developers actually face, while developing something. I highly respect you for your efforts.
@Ivoryke
@Ivoryke 3 жыл бұрын
I really enjoyed and learned watching this one as a junior programmer!
@altynbekmamasadykov4526
@altynbekmamasadykov4526 3 жыл бұрын
Thanks for your videos Povilas, I am also beginner laravel Developer, i'm your fan, your videos are very helpful. When I start earning money i will obviously buy your " eloquent course"
@resin01
@resin01 3 жыл бұрын
Great video. As for multi-line edit. Just double tap ctrl, and use arrow down to select all lines. Hit "End" to get the cursor to the same location on each line. Now remove the middleware in one go.
@ravilamontagne9836
@ravilamontagne9836 3 жыл бұрын
or just hold alt as your move the cursor
@nclsv
@nclsv 3 жыл бұрын
Well then.. This 'refactoring' went so fast, I felt bad I couldn't follow everything. Time to brush up on my Laravel skills again. Quality video by the way. THIS is how juniors improve and learn different code styles and refactoring.
@sheykhsaiful3014
@sheykhsaiful3014 3 жыл бұрын
It helps us a lot as a junior Dev. please keep Reviewing .
@SmailPeche
@SmailPeche 3 жыл бұрын
after watching this video i’am not a junior developer anymore 😁 , more videos like this sir. this is awesome, thank you povilas ❤️
@udaranayana8305
@udaranayana8305 3 жыл бұрын
after 7 months of coding in laravel I finally got a hang of its basics... but this video shows me I just scraped the tip of the iceberg...
@richt222
@richt222 3 жыл бұрын
Love code reviews like this! Please do more. It's a great way to learn. Thanks!
@junaidahmad5783
@junaidahmad5783 3 жыл бұрын
Amazing concept! Please do as many videos as you can easily. This is great content. Keep up the awesome work. 👍👍👍
@sharjeeljan
@sharjeeljan 3 жыл бұрын
Loved your disclaimers!! Great video! Thanks for sharing. I'm also a junior developer and learning a lot from your videos.
@KJARYA
@KJARYA 3 жыл бұрын
Please make this into a more regular series, very helpful! Thank you.
@redward4383
@redward4383 3 жыл бұрын
Awesome video, happy to see that I'm doing at least some of the things right, but even happier to see what is expected from me to write a better code in laravel.
3 жыл бұрын
This video format is great for the channel as the comment/view ratio it gets. Some stuff is obvious but other is just awesome. Keep this series coming along.
@tlita93
@tlita93 3 жыл бұрын
Such a phenomenal idea for the video. This what I was looking for back when I started just a year ago. I always had a feeling that new/beginner developers want to see what a real application looks like, how every part of it looks like, not just some examples and basic principles. Or even see other beginners how they code and it all looks like. So interesting. I will admitted, I do have some mistakes in common with the "author" of the code you reviewed. You should keep doing videos like this, it's really useful in terms of improving and seeing that we all actually make common mistakes, I'm no different than many other guys who started. It's a normal learning process and we shouldn't be ashamed of our silly, but important mistakes. Really grate video sir. 🙂 Cheers
@codeology1
@codeology1 3 жыл бұрын
Thanks , boss these kind of videos have great tricks... we need more and more
@Claudio_Pereira
@Claudio_Pereira 3 жыл бұрын
Povilas, another great video. I can't get enough of praising and thanking him for his work. And I think your guidelines are not just for juniors! Congratulations!
@vsaliyy
@vsaliyy 3 жыл бұрын
really incredible video quality, learning from your lessons constantly. At work, I recommend your videos to colleagues. Thank you for such quality content! hello from Russia, city of Stavropol: 3
@nbarshain
@nbarshain 3 жыл бұрын
Extremely helpful!! I started coding in Laravel a few months ago, and while I know how to get things done, this helped me learn how to do them the right way. Thank you!
@nftsparatodos1274
@nftsparatodos1274 3 жыл бұрын
Nice video and so many tricks and advises in just 20 minutes. Thanks
@cxian
@cxian 3 жыл бұрын
yes please do more refactoring session. Thank you!
@ChupachuGames
@ChupachuGames 3 жыл бұрын
Another note: if you're looking to refactor your routes, please take the time to make some quick feature tests that hit your routes so you can test when you change anything if something breaks and follow the errors to refactor it correctly.
@zomgpro
@zomgpro 3 жыл бұрын
Great video, love the format. Never knew about the eloquent "when" method. Good way to plug gaps in your knowledge
@yuriysemenikhin302
@yuriysemenikhin302 3 жыл бұрын
I haven't done Laravel in years, but it was still interesting to watch :-)
@gaelduval8410
@gaelduval8410 3 жыл бұрын
This chanel is gold... Great video, as always 🔥 For this code review, I would also go for constants, instead of hardcoding Roles ID everywhere. Like ROLE_MEISTER = 0, and so on. Should make the code way more readable.
@celebritydev1
@celebritydev1 3 жыл бұрын
Wish I could like this video 10x. What a great tutorial
@guilhermemoraes4055
@guilhermemoraes4055 3 жыл бұрын
Please make more videos like this! I loved to check what I am doing wrong and how to fix it and make it a better code !
@DasBeatz
@DasBeatz 3 жыл бұрын
Thank you this was awesome! As someone just refreshing their Laravel knowledge I learned so much
@ghostinplainsight4803
@ghostinplainsight4803 3 жыл бұрын
Refactoring is like ointment for my soul. I don't even use php but this is such a great idea for youtube content.
@chiagozieokafor5512
@chiagozieokafor5512 Жыл бұрын
Thanks alot Sir This video is just so golden for me Will sure watch more of this kind of your videos 🔥🔥🔥
@IvanIvanov-qx5oz
@IvanIvanov-qx5oz 3 жыл бұрын
I don't even know what the heck Laravel is, but that is a neat video format.
@vicsystems
@vicsystems 3 жыл бұрын
🥺
@patrick-dev
@patrick-dev 3 жыл бұрын
As a web developer in 2021, If you really don't know what Laravel is, you have a problem buddy!
@invadervim9037
@invadervim9037 3 жыл бұрын
If a resource route was used you might also run into the issue of not all the routes expected being present, which very well might be intentional as you might not need all of them. They are; index, create, store, show, edit, update and destroy. If any are not needed you can chain the "only" or "except" methods when defining the route: Route::resource('photos', PhotoController::class)->only([ 'index', 'show' ]); or Route::resource('photos', PhotoController::class)->except([ 'create', 'store', 'update', 'destroy' ]); respectively. If a resource route is defined and all expected methods are not accounted for then artisan will throw an error. This is a great vid, just hoping to help out too if i can.
@vicsystems
@vicsystems 3 жыл бұрын
You really boost the morale for LARAVEL for all junior devs.
@chrismellor7027
@chrismellor7027 3 жыл бұрын
Cool video concept. Definitely do more of these as they’re interesting. I learnt a few things too 🥳
@JouvaMoufette
@JouvaMoufette 3 жыл бұрын
Pretty good review. Only thing I would have said more explicitly is that Material:all() returns a collection, so the where is using PHP code to do its job. It may not be as obvious to the junior that the all() sets up the query AND fetches, where as the where function of the Eloquent model is simply utilizing a query builder and get does the fetch. The confusion mostly stemming from the collision of some function names in collections vs query builder for eloquent.
@agungyudhaberliantara5561
@agungyudhaberliantara5561 3 жыл бұрын
Best and crystal clear tutorial, thanks a lot 🙏
@QueeeeenZ
@QueeeeenZ 3 жыл бұрын
Can you please make more refactoring videos like this? please!! It was soo good!
@codingdunia
@codingdunia 3 жыл бұрын
Keep it up sir. I always wait for your videos. I learnt more things in laravel.
@debjit21
@debjit21 3 жыл бұрын
We need more this type of videos. Thank you.
@ah-rasel
@ah-rasel 3 жыл бұрын
I was just checking about Today's video 5 minutes ago 😁. Now here it is. Thank you Povilas.
@LaravelDaily
@LaravelDaily 3 жыл бұрын
Yeah, this one took longer time to produce than I expected. Started with idea that "I'll just give a few tips in 5 minutes", and published this video 4 hours later :)
@bilawalshah7700
@bilawalshah7700 3 жыл бұрын
Laravel daily sir, it help us alot because we are junior
@rajaasyraf25
@rajaasyraf25 3 жыл бұрын
Thank you for the video. We need more like this. Keep it up!
@rtpHarry
@rtpHarry 3 жыл бұрын
Wow, I don't even code in Laravel but I couldn't stop watching. I wish there was something like this for code in Ionic, Angular, Vue or Firebase.
@rohannnsingh84
@rohannnsingh84 3 жыл бұрын
very very helpful sir you help me very much in laravel as i am also a laravel developer . Really thanks for your knowledgeful videos and keep ahead sir one more time thank you very much
@eyadbereh
@eyadbereh 2 жыл бұрын
At 9:30, i can see that the migration contains insertion operations I suggest moving those to a specific seeder class (e.g. RolesTableSeeder), because a migration isn't meant to seed database
@CoderGeek-u6m
@CoderGeek-u6m 6 ай бұрын
I am new to Laravel and some of these things are how I coding with Laravel, some are new and I'm excited to get more.
@SlimAndCherryTravel
@SlimAndCherryTravel 3 жыл бұрын
This is really great, thank you. It's embarrassing to me that you probably just wrote more code in 20mins than I wrote all day today.
@stevendiaz7374
@stevendiaz7374 3 жыл бұрын
Nice video, very helpful for junior laravel devs Details that can simplify your life a lot!
@nawt12
@nawt12 3 жыл бұрын
Hope this series got more video. very helpful for all. thanks a lot.
@RuwanBandaraUT
@RuwanBandaraUT 3 жыл бұрын
Thank you so much.. You are doing great things for beginners... Keep it up
@VadimBesedin
@VadimBesedin 3 жыл бұрын
In PHP Storm you can use "Alt+J" to select next occurrences of the selected code or use "CTRL+Shift+Alt+J" to select ALL occurrences of the selected code.
@LaravelDaily
@LaravelDaily 2 жыл бұрын
Liked this video? I have many more: subscribe to my 30+ Laravel courses laraveldaily.com/courses
@frnkquito
@frnkquito 3 жыл бұрын
Awesome video, perfectly explained, easy to understand, high value tips
@sadiarahman467
@sadiarahman467 3 жыл бұрын
Thanks a lot . Please , make more video like this. It's very educative.
@rehabragab5937
@rehabragab5937 3 жыл бұрын
Great video,we need more videos like this
@ehabtalaat10
@ehabtalaat10 3 жыл бұрын
we need more videos like this .thank you for this video
@zuhrulanam5971
@zuhrulanam5971 2 жыл бұрын
Very cool how you give tutorial, thanks for the video man!
@klerfe85
@klerfe85 3 жыл бұрын
Awesome! Really really great idea for video. Practical examples...
@rahafmoute4781
@rahafmoute4781 10 ай бұрын
big thanks for you , you are the best in youtube truly
@ajzack983
@ajzack983 Жыл бұрын
I love these , I hope you still make them
@LaravelDaily
@LaravelDaily Жыл бұрын
I've made a lot of them, until I started repeating myself. See the Playlists of the channel, there should be one with reviews
@apriljoyaltiche3298
@apriljoyaltiche3298 3 жыл бұрын
More of this, please! I am just starting in the laravel world :D
@collincod4811
@collincod4811 3 жыл бұрын
Great Video. I would love to watch more videos like this.
@mibrahim4245
@mibrahim4245 2 жыл бұрын
simply, LEGEND ! Thanks, I learned a lot ...
@georgebalan8452
@georgebalan8452 3 жыл бұрын
This was really great, had to pause a lot to think... :). Really useful to see.
@RindiBudiaramdhan040490
@RindiBudiaramdhan040490 3 жыл бұрын
need more like this. Code Review. Thanks for this share
@raulrozza
@raulrozza 3 жыл бұрын
I don't even code on PHP but I enjoyed the video, mostly for the lessons on organization and cleaner code.
@vitouvitou5269
@vitouvitou5269 3 жыл бұрын
Thank you teacher .. please do this more
@Nemnes
@Nemnes 3 жыл бұрын
useful, its always nice to watch videos like that one
@coolcha
@coolcha 3 жыл бұрын
Please create more videos like this. This is so helpful.
@azabudskyi
@azabudskyi 3 жыл бұрын
Thanks. It was very helpful. A lot of tips that I think about every time when write code like "How to do in this situation" or "How it should be in correct way"?
@sarder2008
@sarder2008 3 жыл бұрын
I just learned how to use in_array, thank you very much :)
@taufiqshamad443
@taufiqshamad443 3 жыл бұрын
Me too
@DimaSimonishvili
@DimaSimonishvili 3 жыл бұрын
16:54 and for this to work of course DB column names & form names should match. Otherwise, we still need to reference manually.
@dumdcode3845
@dumdcode3845 Жыл бұрын
This tutorial is very helpful! Thank you so much!
@gravitygear786
@gravitygear786 2 жыл бұрын
the "store" method review i like the most
@username8586
@username8586 3 жыл бұрын
You helped me alot with the $requests... I did it the same way as you mentioned but i left it inside the function what felt tottaly wrong and now i know why i had this feeling all the time
@cethartest469
@cethartest469 3 жыл бұрын
thx povilas, really awesome, we want more and more videos like this videoo
@jimmyvasquez7980
@jimmyvasquez7980 3 жыл бұрын
What a video! Thanks! It 'was so useful!
@ahmedbreeka4379
@ahmedbreeka4379 3 жыл бұрын
wow , it's amazing , thank you very much , I got a lot of information in this video
@dhoneilangchangco5140
@dhoneilangchangco5140 3 жыл бұрын
this was too satisfying to watch
@tuliovargas
@tuliovargas 3 жыл бұрын
It's such a great video. 👏
@madesuande5255
@madesuande5255 2 жыл бұрын
It very help me as baginner aravel code. Thank you sir
@LaurensiusAdiKun
@LaurensiusAdiKun 3 жыл бұрын
16:36 the problem with using mass assignment there, created_at isn't getting filled in my project. I don't set timestamp to false, since using save() works just fine. I'm on Laravel 6.20. Maybe I'm missing something.
@ollimac73
@ollimac73 3 жыл бұрын
Great video, need more of this unique learning, particularly useful for any dev level. Amazing advice to junior and senior at the video introduction. 👏
@thatsenam9183
@thatsenam9183 3 жыл бұрын
Awesome explanation.
@eleazarfederio1718
@eleazarfederio1718 3 жыл бұрын
your youtube channel is very informative
Laravel Junior Code Review: Security and Consistency
17:29
Laravel Daily
Рет қаралды 50 М.
Laravel Junior Code Review: 12 Tips on Everything
15:30
Laravel Daily
Рет қаралды 76 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Laravel Security: Top 7 Mistakes Developers Make
11:16
Laravel Daily
Рет қаралды 87 М.
Got a New Laravel Job? 3 Tips to Analyze Project Codebase Fast
7:23
Laravel Daily
Рет қаралды 3,6 М.
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 145 М.
Laravel Code Review: Why NOT Use Repository Pattern?
14:21
Laravel Daily
Рет қаралды 80 М.
8 Career Tips from My 25 Years as Developer
12:08
Laravel Daily
Рет қаралды 8 М.
Junior Code Review: Better Routes, CRUDs and Validation
17:58
Laravel Daily
Рет қаралды 60 М.
12 Laravel Tips in 8 Minutes: November 2024
8:31
Laravel Daily
Рет қаралды 4,9 М.
Faster Eloquent: Avoid Accessors with Foreach
9:35
Laravel Daily
Рет қаралды 54 М.
Exceptions in Laravel: Why/How to Use and Create Your Own
12:18
Laravel Daily
Рет қаралды 89 М.
Laravel Mini CRM for Beginners in 1 Hour: Step-by-Step
1:12:57
Laravel Daily
Рет қаралды 15 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 81 МЛН