ericivan / github-oauth2
1.0.0
2018-04-19 08:36 UTC
Requires
- php: >=5.5
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: ~4.0|~5.0
This package is not auto-updated.
Last update: 2025-03-30 08:12:20 UTC
README
app.php 加入 \Github\GithubServiceProvider::class,
aliases 加入 Facade 'Github' => \Github\Facades\Github::class,
serives.php 中加入配置项
'github'=>[ 'client_id' => 'client_id', 'client_secret' => 'client_secret', 'redirect_url' => 'redirect_url', ]
基本使用
获取登录跳转地址
Github::with('github')->redirect();
回调地址获取登录用户
$user=Github::with('github')->user();