Like the video? If you like you can help me keeping doing them by making a donation here.

What if you see a method that is missing in the Colleciton class, and you would like to add your code is non-disruptive way? Welcome to Macros. Macros are method extensions that you insert to the Laravel core classes that use the Macroable trait. They are very simple to be added and in this video tutorial we'll see an example on how to create a 'left' method in the Collection class and then use it anywhere in your code.