简体   繁体   中英

Laravel - Class 'Socialite' not found

Hi there I have problem with Socialite.

I have installed everything how was in GitHub - https://github.com/laravel/socialite but I don't know why but always I have this same problem 截图

Thanks, S

Put the use Socialite; at the top of the UserController.php file.

Try:

composer dump-autoload

composer install installs the vendor packages according to composer.lock (or creates composer.lock if not present),

composer update always regenerates composer.lock and installs the lastest versions of available packages based on composer.json

composer dump-autoload won't download a thing. It just regenerates the list of all classes that need to be included in the project (autoload_classmap.php). Ideal for when you have a new class inside your project. Ideally, you execute composer dump-autoload -o , for a faster load of your webpages. The only reason it is not default, is because it takes a bit longer to generate (but is only slightly noticable)

Also run this command:

php artisan config:clear

Hope it will help you :)

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