Skip to content

Commit

Permalink
fix bug on updaterole
Browse files Browse the repository at this point in the history
  • Loading branch information
aacassandra committed Nov 27, 2020
1 parent c601d1e commit 4529b10
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/BeautyEloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,7 @@ public static function UpdateRole($id, $permissions = [])
$template = BeautyEloquentTools::ResponseTemplate();
if ($role !== null) {
$role->save();
if (isset($permissions) && count($permissions) >= 1) {
$role->syncPermissions($permissions);
}
$role->syncPermissions($permissions);
$template->status = true;
$template->output = $role;
} else {
Expand Down

0 comments on commit 4529b10

Please sign in to comment.