mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Merge pull request #302 from Propaganistas/patch-1
Fix Auth driver detection in Laravel 5.2
This commit is contained in:
+3
-1
@@ -11,6 +11,7 @@
|
||||
namespace Barryvdh\LaravelIdeHelper;
|
||||
|
||||
use Illuminate\Foundation\AliasLoader;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Config\Repository as ConfigRepository;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
@@ -117,7 +118,8 @@ class Generator
|
||||
|
||||
try{
|
||||
if (class_exists('Auth') && is_a('Auth', '\Illuminate\Support\Facades\Auth', true)) {
|
||||
$class = get_class(\Auth::driver());
|
||||
$authMethod = version_compare(Application::VERSION, '5.2', '>=') ? 'guard' : 'driver';
|
||||
$class = get_class(\Auth::$authMethod());
|
||||
$this->extra['Auth'] = array($class);
|
||||
$this->interfaces['\Illuminate\Auth\UserProviderInterface'] = $class;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user