Laravel has some pretty awesome helpers. You've probably used them several times throughout your application. For instance to get the current URL you can use the url() helper, or to return a user back to the previous page you can use the back() helper.

These helpers really are... Well, helpful. But, there are some special conditions when I need my own custom global helpers, and implementing this functionality is much easier than you might think. Let's walk through it.

laravel custom helpers