Created
January 16, 2019 11:55
-
-
Save cavearr/6dc64ae43056d5d044b9faac384f7231 to your computer and use it in GitHub Desktop.
[COMPOSER] autoload your own classes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Create your directory structure for your code (case sensitive) | |
2) Add autoload object to composer.json: | |
"autoload": { | |
"psr-4": { | |
"Your-Namespace\\" : "your-dir/" | |
} | |
} | |
3) update autoloader: composer dump-autoload | |
4) use your classes and namespaces. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment