Helpers File in Laravel 5

Posted 4 years ago by itstrueimryan

Hey, dumb question here. I created a Helpers.php class in the app folder and I want it to be autoloaded when I invoke a Helpers::function() in a view. I tried adding it to classmap and then doing composer dump-autoload, but it doesn't seem to be working (class Helpers not found). here's my autoload composer:

"autoload": {
        "classmap": [
        "psr-4": {
            "[app-name]\\": "app/"

What do I have to add to get that working? Thanks!

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.