Code Refactoring Workshop
summary
Covers six submitted Laravel code samples; runs Pint to normalize style, removes dead code (shrinks a file ~30–40%), inverts nested ifs to early returns, moves dependencies into action-method injection, replaces array_column+array_combine with pluck, swaps helper dispatch for static job dispatch, uses abort_if instead of nested guards, prefers request injection over facades, converts array logic to Collections (map/keys/join), and demonstrates unit tests with artisan make:test and RefreshDatabase.
AI-written summary · about
chapters (10)
- 0:00Introduction and setup
- 1:02Normalization and dead code
- 3:54Deep cleaning techniques
- 6:41Improving readability
- 11:53Leveraging Laravel features
- 15:44Refining controller logic
- 18:21Streamlining workflows
- 21:01Optimizing with collections
- 26:58Testing in isolation
- 33:36Q&A session








