Skip to content

Commit 095cb55

Browse files
committed
add(control): role
1 parent e343966 commit 095cb55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

laravel/app/Http/Controllers/Api/RoleController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(Request $request)
3333
*/
3434
public function index()
3535
{
36-
$list = Role::orderBy('sort')->paginate($this->perPage);
36+
$list = Role::paginate($this->perPage);
3737
return $this->out(200, $list);
3838
}
3939

@@ -44,9 +44,9 @@ public function index()
4444
*/
4545
public function create()
4646
{
47-
$roles = Permission::get(); // 获取所有权限
47+
$permissions = Permission::get(); // 获取所有权限
4848

49-
return $this->out(200, ['roles' => $roles, 'method' => 'create']);
49+
return $this->out(200, ['permissions' => $permissions, 'method' => 'create']);
5050
}
5151

5252
/**

0 commit comments

Comments
 (0)