I would like to create helper functions to avoid repeating code between views in Laravel 5:
view.blade.php
Foo Formated text: {{ fo
For Custom Helper Libraries in my Laravel project, I have created a folder with name Libraries
in my Laravel/App
Directory and within Libraries directory, I have created various files for different helper libraries.
After creating my helper files I simply include all those files in my composer.json file like this
...
"autoload": {
"classmap": [
"database"
],
"files": [
"app/Libraries/commonFunctions.php"
],
"psr-4": {
"App\\": "app/"
}
},
...
and execute
composer dump-autoload