mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 10:33:11 +00:00
Test auth is binded before detect Auth driver (#946)
* Test `auth` is binded before detect Auth driver some project may not need Auth service provider * fix codingstyle
This commit is contained in:
+2
-1
@@ -123,7 +123,8 @@ class Generator
|
|||||||
$this->interfaces['\Illuminate\Contracts\Auth\Authenticatable'] = $defaultUserModel;
|
$this->interfaces['\Illuminate\Contracts\Auth\Authenticatable'] = $defaultUserModel;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (class_exists('Auth') && is_a('Auth', '\Illuminate\Support\Facades\Auth', true)) {
|
if (class_exists('Auth') && is_a('Auth', '\Illuminate\Support\Facades\Auth', true)
|
||||||
|
&& app()->bound('auth')) {
|
||||||
if (class_exists('\Illuminate\Foundation\Application')) {
|
if (class_exists('\Illuminate\Foundation\Application')) {
|
||||||
$authMethod = version_compare(Application::VERSION, '5.2', '>=') ? 'guard' : 'driver';
|
$authMethod = version_compare(Application::VERSION, '5.2', '>=') ? 'guard' : 'driver';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user