How to Create a Custom helpers in Laravel
In this article, I will share with you how to create a custom helpers in Laravel
Create a helpers.php
file in your app/Http folder and load it up with composer:
"autoload": {
"classmap": [
...
],
"files": [
"app/Http/helpers.php" // <---- ADD THIS
]
},
After adding that to your composer.json
file, run the following command:
composer dump-autoload
I hope it will help you.
Copyright 2024 ErrorGram