Junior Laravel Developer Code Review - Reviewing Routes, Migrations, Models & Controllers in Laravel

preview_player
Показать описание
In this tutorial, we'll take a deep dive into a junior developer its Laravel code and review some of the key components, including Migrations, Routing, Models, and Controllers. We’ll start off by looking at the routing system to make sure that the endpoints are secure and efficient. From there, we’ll move on to the database migrations to ensure that they are following best practices and are properly structured. Next, we'll look at the models and controllers to see how they are structured and organized. We'll provide suggestions for improvements that can make the code more modular, maintainable, and scalable.

Throughout the tutorial, we'll provide explanations and insights into the Laravel framework and highlight common mistakes that junior developers often make. By the end of the tutorial, you'll have a solid understanding of what to look for when reviewing Laravel code and how to provide constructive feedback to junior developers. So whether you're a senior developer looking to mentor junior developers or a junior developer looking to improve your skills, this tutorial is for you!

🧑🏼💻 Let’s plan a meeting

💌 Newsletter

📚 New Udemy Course

🔥 Resources

🔗 Useful Links

📋 Table of Content
00:00 - Introduction
01:00 - Routing
06:56 - Migrations
13:08 - Suggestion 1: Create a Reuseable Method for Authenticated Users
17:22 - Suggestion 2: Create a Middleware for the User Roles
21:16 - CRUD Controller
24:55 - Common Junior Developer Mistakes
26:18 - Outro

#laravel #laravel10 #php #laravel_development
Рекомендации по теме
Комментарии
Автор

Do you think I should create more code review tutorials? Let me know!

Follow me or subscribe to my newsletter to get notified when my course is released:

codewithdary
Автор

This channel is a goldmine, you dont get to see these type of reviews and content unless its premium content, glad that i found it

TuxxFF
Автор

Hi Dary, I hope you continue with this series as someone who is still learning Laravel you gave alotof great tips.

jackelofnar
Автор

Great, please continue with this kinda series. Thanks so much, Dary.

baochungpro
Автор

Much informative Dary. Definitely looking to more of your code review tutorials.

petermwangi
Автор

promise fulfilled! Thank you mr Dary and looking forward to having more tutorials like this.

basharumar
Автор

Hello dary, thanks for the review and for the corrections, i'll make sure to apply them in my next versions. Again thanks a lot, it means a lot. Keep it up!

brking
Автор

Dude your videos are great, you'll be at 100k subscribers in no time!

GavinKimpson
Автор

Hey Dary, At 22:33, the "validated" method is more convenient than the "only" method.

waleedgrt
Автор

That's a good video!
But I have a few points that concerns me.
If you injected FormRequest class instead of general Request, then you don't need to call "$request->validated()" to trigger validation. It would be taken care of by Laravel itself.
I think it's not a good point to use "auth()" helper inside any models function - it seem not obvious and has it's own issues. I would use "$this" instead. For me it seem more convenient.

DenysKravtsov-on
Автор

Hi Dary what extension do you use to see what type of the value needed inside the parameters
ex: $table->string(column: 'extension');
the "column""

ricardozapanta
Автор

at 8:45, how your methods are showing key like
$table->string(column: "something")

which extension you are using to show "column" thing?

jjplays
Автор

What theme, font and spacing are u using? Nice video

igerardogc
Автор

$request->validated() returns only validated fields. You can safly use $model->update( $request->validated() ) i think...

grzesiekb
Автор

thank you dary
i have simple question why you sometimes use ->value
and sometimes not
i means in enum

ramzibenssaci
Автор

what is the difference between using foreign or foreignID and which is better?

basharumar
Автор

i hope one day you will teach us more about the difference between policies and guardes, listeners and observers etc.

basharumar
Автор

Why do need $request->validated() in controller since it returns validated data from request? Doesn't validation happen automatically?

pauliusjankauskas
Автор

Is there really such a method as `required` on the ColumnDefinition? Never heard of it 🤔

newtonjob
Автор

putting $guarded=[] (empty array) in the model is same as $fillable=[..all request keys here..] and i think you cant put both of these two variables in the same model

abukhalid