10+ Laravel Refactoring Examples
December 2021 / 1 h 23 min / Laravel 8
Watch Video About the Course
Notice: if you're interested in more courses than just this one, the best deal is to subscribe to the Yearly membership!
A very typical scenario I've seen dozens of times is when the code is less than ideal but developers are "scared" to touch it and change it for the better, often because of limited time.
In this course, I want to show a dozen of examples from real-life scenarios of such refactorings, with before/after repositories available on Github.
Important accent in this course will be on automated PHPUnit testing: you should write tests to cover the functionality before the refactoring, so you would be able to test if it all works after the refactoring.
I see this as an "ongoing" course, so if you have any ideas for more refactoring examples, let me know [email protected]
Your Instructor
I consider myself a Laravel expert. Work with Laravel for around 7 years, sharing my thoughts on the YouTube channel "Laravel Daily": https://www.youtube.com/c/LaravelDaily
I also have written a Laravel Daily Blog for 5+ years.
Course Curriculum
-
PreviewIntro: What's Inside the Course (2:07)
-
PreviewAlmost Identical store/update Controller Methods - to Form Request (7:15)
-
PreviewLong Controller Method - to Form Request and Observer (5:14)
-
StartQuery Filter: From If-Else to When, or to Spatie Package (7:18)
-
StartDate formats: from Y-m-d to m/d/Y to Flexible Config (7:48)
-
StartLong Class Method - Into Smaller Methods (6:20)
-
StartRenaming DB Table and Eloquent Model with TDD (9:54)
-
StartUpgrading Minor Laravel Version to Use New Feature (3:46)
-
StartFrom Repeating HTML to Blade Component (4:45)
-
StartFrom Single Controllers Folder to Admin/User Namespaces (4:29)
-
StartDB Refactoring: From BelongsTo to BelongsToMany (11:38)
-
Start5-Step Refactoring When Client Changes Their Mind Multiple Times (14:13)