From ae2c6dadb8901130a1d770c597ad95109338ad2e Mon Sep 17 00:00:00 2001 From: vijay kumar Date: Mon, 28 Dec 2015 14:48:25 +0530 Subject: [PATCH 1/2] Fix for MigrationCommand for laravel 5.2.* #462 --- src/commands/MigrationCommand.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/commands/MigrationCommand.php b/src/commands/MigrationCommand.php index ef5433d8..0132f795 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'); + $defaultGaurd = Config::get('auth.defaults.guard'); + $providerName = Config::get('auth.guards.'.$defaultGaurd); + $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'); From 53fff063f8d347d5018ff6e8e8f1a6bc2aa70d6c Mon Sep 17 00:00:00 2001 From: vijay kumar Date: Mon, 28 Dec 2015 18:07:01 +0530 Subject: [PATCH 2/2] fix typo #462 --- src/commands/MigrationCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/MigrationCommand.php b/src/commands/MigrationCommand.php index 0132f795..bf8fc1c3 100644 --- a/src/commands/MigrationCommand.php +++ b/src/commands/MigrationCommand.php @@ -81,8 +81,8 @@ protected function createMigration($rolesTable, $roleUserTable, $permissionsTabl { $migrationFile = base_path("/database/migrations")."/".date('Y_m_d_His')."_entrust_setup_tables.php"; - $defaultGaurd = Config::get('auth.defaults.guard'); - $providerName = Config::get('auth.guards.'.$defaultGaurd); + $defaultGuard = Config::get('auth.defaults.guard'); + $providerName = Config::get('auth.guards.'.$defaultGuard); $UserClass = Config::get('auth.providers.'.$providerName["provider"]); $usersTable = $providerName['provider'];