Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
Fix group by issue
Browse files Browse the repository at this point in the history
  • Loading branch information
romanbican committed Jul 29, 2015
1 parent 35a57a9 commit fd275b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bican/Roles/Traits/HasRoleAndPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function rolePermissions()
return $permissionModel::select(['permissions.*', 'permission_role.created_at as pivot_created_at', 'permission_role.updated_at as pivot_updated_at'])
->join('permission_role', 'permission_role.permission_id', '=', 'permissions.id')->join('roles', 'roles.id', '=', 'permission_role.role_id')
->whereIn('roles.id', $this->getRoles()->lists('id')->toArray()) ->orWhere('roles.level', '<', $this->level())
->groupBy('permissions.id');
->groupBy(['permissions.id', 'pivot_created_at', 'pivot_updated_at']);
}

/**
Expand Down

0 comments on commit fd275b0

Please sign in to comment.