Sometimes, you will stumble on some functionalities that will be required in so many different parts of your application, then will wonder why you have to keep duplicating this same lines of codes instead of implementing it once and having it reused. Create a folder Helpers in your Laravel app directory. Create your helper file in your Laravel app\Helpers folder and give it any name of your choice, we will call the file helper.php in this article. Load the file app/Helpers/helper.php up in your composer.json file. After adding that to your composer.json file, run the following command: And that is it, you can declare your functions, classes and/or variables within the helper.php file and it will be available for use in all controllers, views and models.