PHP code example of wuwx / laravel-socialite-neuqids
1. Go to this page and download the library: Download wuwx/laravel-socialite-neuqids library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wuwx / laravel-socialite-neuqids example snippets
use Laravel\Socialite\Facades\Socialite;
class LoginController extends Controller
{
public function showLoginForm()
{
return redirect()->route("login.neuqids");
}
public function redirectToProvider()
{
return Socialite::driver('neuqids')->redirect();
}
public function handleProviderCallback()
{
$user = Socialite::driver('neuqids')->user();
}
}
Route::get('login/neuqids', 'Auth\LoginController@redirectToProvider')->name("login.neuqids");
Route::get('login/neuqids/callback', 'Auth\LoginController@handleProviderCallback')->name("login.neuqids.callback");