From 8742be99ce72007b954d2ff86aafe0a941c00065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Mon, 11 Feb 2019 15:27:20 +0800 Subject: [PATCH] Update PdAuthServiceProvider.php --- src/PdAuthServiceProvider.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/PdAuthServiceProvider.php b/src/PdAuthServiceProvider.php index 99dd353..72aa4ca 100644 --- a/src/PdAuthServiceProvider.php +++ b/src/PdAuthServiceProvider.php @@ -33,19 +33,11 @@ class PdAuthServiceProvider extends ServiceProvider return null; }); - if (!isset($config['guards']['auth'])) { + if (!isset($config['guards'][$key])) { config(['auth.guards.' . $key => ['driver' => $key]]); - $this->app['auth']->shouldUse('auth'); } } -// $config = $this->app['config']['auth']; -// -// if (!isset($config['guards']['auth'])) { -// config(['auth.guards.auth' => ['driver' => 'auth']]); -// $this->app['auth']->shouldUse('auth'); -// } - $this->setupRouter(); }