composer php - PHP Include class by using "use" with PSR-4 -


i'm using psr-4, defined psr-4 section on composer.json

"autoload": {         "classmap":[                         ],                   "psr-4": {             "app\\": "app/"                  } }, 

when tried import class using "use" keyword

use app\http\controllers\controller; 

i error: fatalerrorexception in uploadfilescontroller.php line 13: class 'controllers\controller' not found

if set static route file

include("c:\xampp\..."); 

it works, after found same problem other files including php clases illuminate.

what's problem?


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -