Extending Laravel's URI Class with Custom Macros
Laravel has always excelled at making common web development tasks elegant and expressive. With the addition of the Macroable trait to the URI class, you can now create your own custom URL manipulation methods that feel like they were built into the framework from day one. Understanding the URI Class