Finish mzl_dev
This commit is contained in:
@@ -53,6 +53,6 @@ class Role extends Model
|
||||
// 角色拥有的资源(权限点、菜单)
|
||||
public function resources()
|
||||
{
|
||||
return $this->belongsToMany(Resource::class, 'role_resources', 'role_id', 'resource_id');
|
||||
return $this->belongsToMany(Resource::class, 'role_resources', 'role_id', 'resource_id')->orderBy('sort', 'asc');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class User extends Model
|
||||
// 用户直接拥有的资源(用于特殊补权)
|
||||
public function resources()
|
||||
{
|
||||
return $this->belongsToMany(Resource::class, 'user_resources', 'user_id', 'resource_id');
|
||||
return $this->belongsToMany(Resource::class, 'user_resources', 'user_id', 'resource_id')->orderBy('sort', 'asc');
|
||||
}
|
||||
|
||||
// 用户可访问的系统
|
||||
|
||||
Reference in New Issue
Block a user