How can i use my files in php autoload using composer vendor in files example.controller.php

22 views Asked by At

I have a problem when i change my files for example example.controller.php. it not found, but when i change to exampleController.php it found using autoload composer vendor. if there a solution, thanks lot.

1

There are 1 answers

0
caijw On

Composer autoload psr-4 finds the corresponding file in the file system according to the namespace, so you need to ensure that the class name is consistent with the file name. If you can’t keep the same and want to use composer autoload, you can try other methods, such as files