Oct. 29, 2023, 9:01 p.m. | Denis Sinyukov

DEV Community dev.to

One of the features of Laravel is the ability to extend functionality through custom methods thanks to a concept called "macros".


In this article, we will look at what they are, how to create them, and how they can improve our development.





Understanding Macros


A macro is the injection of custom code into the core of a framework, without the need for complex inheritance or modification.


To implement macros we use the Macroable trait, which has two main methods macro() …

article called concept development features injection laravel macro macros php understanding webdev

SOC 2 Manager, Audit and Certification

@ Deloitte | US and CA Multiple Locations

Data & Security Engineer Lead

@ LiquidX | Singapore, Central Singapore, Singapore

IT and Cyber Risk Control Lead

@ GXS Bank | Singapore - OneNorth

Consultant Senior en Gestion de Crise Cyber et Continuité d’Activité H/F

@ Hifield | Sèvres, France

Cyber Security Analyst (Weekend 1st Shift)

@ Fortress Security Risk Management | Cleveland, OH, United States

Senior Manager, Cybersecurity

@ BlueTriton Brands | Stamford, CT, US