mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-07 02:22:48 +08:00
完成日志管理和管理员分组管理
This commit is contained in:
@@ -13,4 +13,20 @@ class AdminGroup extends Model
|
||||
//
|
||||
use SoftDelete;
|
||||
protected $defaultSoftDelete = 0;
|
||||
|
||||
public function getPermissionsAttr($value)
|
||||
{
|
||||
return \explode(',',$value);
|
||||
}
|
||||
|
||||
public function setPermissionsAttr($value)
|
||||
{
|
||||
|
||||
if(is_array($value)){
|
||||
return join(',',$value);
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,15 @@ class AdminPermission extends Model
|
||||
|
||||
return $status[intval($value)];
|
||||
}
|
||||
|
||||
public function getNameAttr($value)
|
||||
{
|
||||
if(empty($value)){
|
||||
$value = $this->getData('app').'/'.$this->getData('controller').'/'.$this->getData('action');
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user