I have a library called macro
that I want to include in my project. I want to autoload all the files in the folder lib
:
app
| ...
| lib
| | macro
| | | Search.php
| | | SearchFacade.php
| | | SearchServiceProvider.php
| | otherlib
| | | ...
| | lib4
| ...
| filters.php
| routes.php
What do I need to do to autoload all the files in the folder lib, I am using Xampp
, and I am running Windows 8
.
Is it also possible to include in that folder a few standard stylesheets
and javascript scripts
?
Change the autoload section in your composer.json
and add app/lib
to it
autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php",
"app/lib",
],
Then just run composer dump-autoload
in the command line to update the autoloader.