Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aacassandra committed Oct 11, 2020
1 parent b7f5181 commit a3b9524
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/BeautyEloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,13 @@ public static function CreateRole($name, $permissions = [])
* 4 => "8"
* ]
*/
public static function UpdateRole($id, $name, $permissions = [])
public static function UpdateRole($id, $permissions = [])
{
$model = config('laraquent.model.role');
$table = new $model;
$role = $table->find($id);
$template = BeautyEloquentTools::ResponseTemplate();
if ($role !== null) {
$role->name = $name;
$role->save();
if (isset($permissions) && count($permissions) >= 1) {
$role->syncPermissions($permissions);
Expand Down

0 comments on commit a3b9524

Please sign in to comment.