Skip to content

Commit

Permalink
Merge pull request #482 from vijaythecoder/master
Browse files Browse the repository at this point in the history
Fixed broken migration command
  • Loading branch information
andrewelkins committed Mar 4, 2016
2 parents 2654241 + 53fff06 commit d2f1ded
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/commands/MigrationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit d2f1ded

Please sign in to comment.