Im having trouble with my Laravel application and PSR-4 autoloading. I read that you can have multiple 'sub directory' structure in namespaces like this...
VendorName\ApplicationName\(SubDir)\ClassName
Basically I have my user repositories like so...
Acme\Repositories\EloquentUserRepoistory
Acme\Repositories\UserRepositoryInterface
Acme\Repositories\Repository
Acme\Repositories\RepositoryServiceProvider
All with the namespace Acme\Repositories
, but i want to have this directory structure...
Acme\Repositories\UserRepository\EloquentUserRepoistory
Acme\Repositories\UserRepository\UserRepositoryInterface
Acme\Repositories\Repository
Acme\Repositories\RepositoryServiceProvider
but when I move the user repo and interface to the folder UserRepository
, i get class not found?
Im sure im just not getting something really simple about namespaces here?
EDIT
I guess what im asking is how to have the additional directory UserRepository
to keep the different repositories separate from say OrderRepositories?