Answer the question
In order to leave comments, you need to log in
Composer autoload your namespace?
Guys hello. I'm doing a new project, I decided to use autoload from composer. But I can't get my head around his logic. You need to add the namespace "App" so that the loader looks for it in the "app/classes" folder (app is on the same level as the vendor)
in composer.json wrote like this:
"psr-0": {
"App\\": "../app/classes/"
}
namespace App;
class Rooms {
...
use App;
echo Rooms::test();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question