diff --git a/src/commands/MigrationCommand.php b/src/commands/MigrationCommand.php index ef5433d8..bf8fc1c3 100644 --- a/src/commands/MigrationCommand.php +++ b/src/commands/MigrationCommand.php @@ -81,8 +81,12 @@ protected function createMigration($rolesTable, $roleUserTable, $permissionsTabl { $migrationFile = base_path("/database/migrations")."/".date('Y_m_d_His')."_entrust_setup_tables.php"; - $usersTable = Config::get('auth.table'); - $userModel = Config::get('auth.model'); + $defaultGuard = Config::get('auth.defaults.guard'); + $providerName = Config::get('auth.guards.'.$defaultGuard); + $UserClass = Config::get('auth.providers.'.$providerName["provider"]); + + $usersTable = $providerName['provider']; + $userModel = $UserClass['model']; $userKeyName = (new $userModel())->getKeyName(); $data = compact('rolesTable', 'roleUserTable', 'permissionsTable', 'permissionRoleTable', 'usersTable', 'userKeyName');