Before adding your custom functions helper or library to project. Laravel have set most of useful function in helper. Read Laravel’s pre-defined functions in helper https://laravel.com/docs/helpers
So let’s start to add custom function library or helper to your project.
Create directory helpers in “LaravelProject\app\Http”
Create function helper file “func_helper.php” in
“LaravelProject\app\Http\Helpers” directory
Register (Add) func_helper.php file in project
Open file “AppServiceProvider.php”
from “LaravelProject/app/Providers” and write the following in register() method or replace the whole register method with
public function register() { require_once __DIR__ . '/../Http/Helpers/func_helper.php'; }
Add another helper just duplicate line and change file
public function register() { require_once __DIR__ . '/../Http/Helpers/func_helper.php'; require_once __DIR__ . '/../Http/Helpers/another_helper.php'; }