From e2b59c6cb5f99e89ffa6a285dabacf996ff1e331 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Sat, 29 Nov 2014 13:11:10 +0100 Subject: [PATCH] Use config the get User model See #136 --- src/Generator.php | 8 ++++---- src/config/config.php | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Generator.php b/src/Generator.php index 8420862..cea5cae 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -50,6 +50,10 @@ class Generator $this->extra = array_merge($this->extra, $this->config->get('laravel-ide-helper::extra')); $this->magic = array_merge($this->magic, $this->config->get('laravel-ide-helper::magic')); $this->interfaces = array_merge($this->interfaces, $this->config->get('laravel-ide-helper::interfaces')); + // Make all interface classes absolute + foreach ($this->interfaces as &$interface) { + $interface = '\\' . ltrim($interface, '\\'); + } $this->helpers = $helpers; } @@ -150,10 +154,6 @@ class Generator } }catch (\Exception $e) {} - // Make all interface classes absolute - foreach ($this->interfaces as &$interface) { - $interface = '\\' . ltrim($interface, '\\'); - } } /** diff --git a/src/config/config.php b/src/config/config.php index 57f3990..18acac0 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -1,4 +1,6 @@ - array( - '\Illuminate\Auth\UserInterface' => '\User', + '\Illuminate\Auth\UserInterface' => Config::get('auth.model', 'User'), ) );