stucked my heads in some errors.i dont getting where i have done my mistake.
I am using laravel 5
and installed it.I want to use l5-repository
so i installed https://github.com/prettus/l5-repository this repository using composer
commnad:
composer require prettus/l5-repository
and i made all changes as per installation document and its working fine.
after installing repository using composer my directory structure is as below:
curovis
|-- composer.json
|-- composer.lock
|-- app
|-- bootstarp
|-- config
|-- database
`-- vendor
|-- composer
`-- prettus
`-- l5-repository
|-- src
| `-- Prettus
| `-- Repository
`-- composer.json
after this as per doc i have made following entry in /var/www/curovis/config/app.php
:
Prettus\Repository\Providers\RepositoryServiceProvider::class,
and its working fine.
Now i want to change composer.json
of root directory entry as following:
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"Prettus\\Repository\\": "vendor/prettus/l5-repository/src/Prettus"
}
},
and use composer update
command. it also works fine.
now i want use same repo with another name so i have change composer.json
with follwing:
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"RepoTest\\Repository\\": "vendor/repotest/l5-repository/src/RepoTest"
}
},
and add RepoTest\Repository\Providers\RepositoryServiceProvider::class,
in app.php
file.run composer update
command. then it gives following error:
FatalErrorException in /var/www/curovis/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php line 146: Class 'RepoTest\Repository\Providers\RepositoryServiceProvider' not found
i cant understand why laravel is looking for /var/www/curovis/vendor/laravel/framework/src
this path instead of provided as "RepoTest\\Repository\\": "vendor/repotest/l5-repository/src/RepoTest"
in composer.json.
is anything i am missing or any error in composer.
Thanks for help.