I am using laravel. I created Orders folder in app directory and created class Payments.
I added that class by namespace into my controller (by using phpstorm suggestions) and It worked fine.
Now my question is why do we use composer psr-4 autoload if we can add classes directly using namespace?
Following is composer psr-4 autoload example
"psr-4": {
"App\\": "app/",
"Orders\\": "app/Orders",
}
Now what is the benifit of adding my module folder in psr-4 autoload because I can add classes without psr-4 autoload?