PHP code example of framgia / fauth-php
1. Go to this page and download the library: Download framgia/fauth-php 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/ */
framgia / fauth-php example snippets
namespace App\Http\Controllers\Auth;
use Fauth;
class LoginController extends Controller
{
/**
* Redirect the user to the Auth-Framgia authentication page.
*
* @return Response
*/
public function redirectToProvider()
{
return Fauth::driver('framgia')->redirect();
}
/**
* Obtain the user information from Auth-Framgia.
*
* @return Response
*/
public function handleProviderCallback()
{
$user = Fauth::driver('framgia')->user();
}
}