This question already has an answer here:
- Laravel Class Socialite not found 8 answers
I am using Socialite package in my app. I followed all the instructions from the official github page. I am using Laravel 5.4.27. When I try to run the app, I get "Class 'Socialite' not found"
error. What do I need to do??
I have also added use Socialite;
, Laravel\Socialite\SocialiteServiceProvider::class,
and 'Socialite' => Laravel\Socialite\Facades\Socialite::class,
and I am using version 3
of socialite.
Here's the controller:
<?php
namespace App\Http\Controllers\Auth;
use Socialite;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class SocialLoginController extends Controller {
public function redirectToProvider($service, Request $request) {
return Socialite::driver($service)->redirect();
}
public function handleProviderCallback($service, Request $request) {
}
}
What do I do?