laravel / socialite

Laravel wrapper around OAuth 1 & OAuth 2 libraries.
https://laravel.com/docs/socialite
MIT License
5.58k stars 940 forks source link

Class socialite does not exist #409

Closed thewebartisan7 closed 5 years ago

thewebartisan7 commented 5 years ago

Description:

Socialite is installed and I add in config/app.php the Service Provider and as alias the Facade, like below:

    'providers' => [
        Laravel\Socialite\SocialiteServiceProvider::class,
    ],

    'aliases' => [
        'Socialite' => Laravel\Socialite\Facades\Socialite::class
    ],

But should be already loded the provider and alias since it's in composer?

        "laravel": {
            "providers": [
                "Laravel\\Socialite\\SocialiteServiceProvider"
            ],
            "aliases": {
                "Socialite": "Laravel\\Socialite\\Facades\\Socialite"
            }
        }

I try also without including in config/app.php but it's the same.

In controller I add use Socialite;

I try also composer dump-autoload and php artisan cache:clear but nothing, the class suddenly Socialite is not found.

Even in cached file I see that it's correctly included the provider and facade:

Screenshot 2019-11-24 at 13 48 23

What I missing?

Thank You!

thewebartisan7 commented 5 years ago

Fixed! It was something wrong in my application.

hao41815w commented 4 years ago

How did you fix that?

Wulfheart commented 4 years ago

Still interested how this could be solved?

ronimondal commented 4 years ago

same issue

angelorubin commented 1 month ago

I have same problem (2024), anyone else?