Loading…

How to make a helper file in laravel?

We can create a helper file using Composer. Steps are given below:-

  • Please create a "app/helpers.php" file that is in app folder.
  • Add
    "files": [
        "app/helpers.php"
    ]

    in "autoload" variable.
  • Now update your composer.json with composer dump-autoload or composer update

Suggest An Answer

No suggestions avaliable!

Latest post from Laravel Interview Questions

Ask Question