From 03cb76c608efff57f117bd7c8567f3481c099fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Thu, 14 Feb 2019 19:07:17 +0800 Subject: [PATCH] Update PdAuthServiceProvider.php --- src/PdAuthServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PdAuthServiceProvider.php b/src/PdAuthServiceProvider.php index 72aa4ca..a0c8169 100644 --- a/src/PdAuthServiceProvider.php +++ b/src/PdAuthServiceProvider.php @@ -57,7 +57,7 @@ class PdAuthServiceProvider extends ServiceProvider protected function setupRouter() { //添加获取token的路由 - $this->app['router']->get('auth/token.json', function (Request $request) { + $this->app['router']->get('api/auth/token.json', function (Request $request) { $code = $request->input('pd_code'); $id = $request->input('app_id'); $token = app('pd.auth')->choose(null, $id)->getAccessToken($code); @@ -69,7 +69,7 @@ class PdAuthServiceProvider extends ServiceProvider ])->withCookie($cookie); }); - $this->app['router']->get('auth/logout', function (Request $request) { + $this->app['router']->get('api/auth/logout', function (Request $request) { app('pd.auth')->logout(); }); }