简体   繁体   中英

Symfony\Component\Debug\Exception\FatalThrowableError Class 'Buno\Readr\ReadrServiceProvider' not found

Hello guys please do not vote down quickly, I have read other post related to this but I do not seem to be getting any results. I am getting this error above, I have ran composer dump autoload, it still tells me class not found when I try to run php artisan serve

In ProviderRepository.php line 208:

 Class 'Buno\Readr\ReadrServiceProvider' not found


PS C:\Users\wilesx\Desktop\rauxmac\blog>

here's my code in in config/app.php

Buno\Readr\ReadrServiceProvider::class

here's where I added composer and do dumpautoload

"autoload-dev": {
    "psr-4": {
        "Tests\\": "tests/",
        "Buno\\Readr\\": "pkgs/readr/src/"
    }
},

PS C:\Users\wilesx\Desktop\rauxmac\blog\pkgs\readr> composer dump-autoload
Generating autoload files
PS C:\Users\wilesx\Desktop\rauxmac\blog\pkgs\readr>

I have once battled with this, your provider will most likely not be found if, it has not been added to composer autoload and dumped properly, or probably doesn't even exists. Looking at your code you seem to be running composer dumpautoload in a wrong directory, make sure to run composer dumpautoload in Laravel root directory that is if you have added your namespace to composer.json file correctly too.

for clarity run composer dump-autoload in this directory -- C:\\Users\\wilesx\\Desktop\\rauxmac\\blog\\

lets see the outcome.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM