Resolve user model at runtime

Fixes #274
This commit is contained in:
Barry vd. Heuvel
2015-10-22 14:26:11 +02:00
parent 76f09aaa65
commit e3de462538
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ return array(
*/
'interfaces' => array(
'\Illuminate\Contracts\Auth\Authenticatable' => config('auth.model', 'App\User'),
),
/*
+2
View File
@@ -113,6 +113,8 @@ class Generator
protected function detectDrivers()
{
$this->interfaces['\Illuminate\Contracts\Auth\Authenticatable'] = config('auth.model', 'App\User');
try{
if (class_exists('Auth') && is_a('Auth', '\Illuminate\Support\Facades\Auth', true)) {
$class = get_class(\Auth::driver());