I\'ve created a library
folder within the app
folder to add my own classes.
This is the content of the file app/library/helper.p
Use composer.json :
"autoload": {
"classmap": [
"database",
"app/Transformers"
]
},
Add your auto load directories like I added app/Transformers.
Don't Forget to add run composer dump-autoload
.
The only problem with this method is you need to run composer dump-autoload
whenever you add new class do that directory.
Or You can use "Files" in composer.json.
"autoload": {
"files": ["src/MyLibrary/functions.php"]
}