Rachid Laasri explains how to easily register multiple macros at once using the mixin function present on the Macroable trait.

Laravel Macros are a clean way to add pieces of functionality to classes you don’t own (core Laravel components) and re-use them in your projects. It was first introduced in the 4.2 version but it was only recently that I discovered the ability to define class-based macros. So, this is what this article is going to be about.

http://rachidlaasri.com/php/laravel/macro/2018/04/28/class-based-macros.html