Skip to content

Commit

Permalink
Merge pull request #113 from ivan-cc/master
Browse files Browse the repository at this point in the history
Fix pivot table name (`role_user`).
  • Loading branch information
jeremykenedy authored Mar 3, 2020
2 parents 261e3f7 + d0961c7 commit 1861eeb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Traits/HasRoleAndPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ trait HasRoleAndPermission
*/
public function roles()
{
return $this->belongsToMany(config('roles.models.role'))->withTimestamps();
return $this->belongsToMany(config('roles.models.role'), config('roles.roleUserTable'))->withTimestamps();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/RoleHasRelations.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function permissions()
*/
public function users()
{
return $this->belongsToMany(config('roles.models.defaultUser'))->withTimestamps();
return $this->belongsToMany(config('roles.models.defaultUser'), config('roles.roleUserTable'))->withTimestamps();
}

/**
Expand Down

0 comments on commit 1861eeb

Please sign in to comment.