Create a file called helpers.php in the app/ directory. Paste the code inside it.
Go to composer.json and add to autoload:
"autoload": {
...
"files": [
"app/helpers.php"
]
},Run composer dump-autoload to load the newly created helpers file.
Hi, may I know where this file should be put and how to load it?