2

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?

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.