Laravel's secret weapon: macros (watch me code)

Опубликовано: 03 Май 2024
на канале: Aaron Francis
23,382
1.2k

Customizing Laravel to do exactly what I want, thanks to macros and the container.

Follow me:
Twitter:   / aarondfrancis  
LinkedIn:   / aarondfrancis  
Website: https://aaronfrancis.com - find articles, podcasts, courses, and more.

Chapters:
00:00 - Introduction: Watch Me Figure Things Out
00:25 - Concept of Internal and External Articles
01:30 - Defining Internal vs External Articles
02:30 - The Problem with External Article Routing
03:50 - Exploring Laravel's URL Generator
05:00 - Diving into the Laravel Source Code
06:30 - Understanding Route URL Generation
08:00 - Hooking Into Laravel's URL Generator
09:45 - Creating a Custom URL Generator
11:00 - Modifying the URL Generator for Custom Routing
13:00 - Using Laravel's Macro System
14:30 - Building a Weak Map for Generators
16:00 - Calling Custom URL Generators
18:00 - Final Implementation: Internal and External Routing
20:00 - Testing and Confirming the Solution
21:00 - Reflections on Customizing Laravel
22:00 - Conclusion: You Can Figure Anything Out