SysRole.php 317 B

12345678910111213141516171819
  1. <?php
  2. namespace app\model;
  3. use \think\Model;
  4. class SysRole extends Model
  5. {
  6. protected $pk = 'roleid';
  7. public function getIdNameList()
  8. {
  9. return $this->column('id, name');
  10. }
  11. public function getpermissionIds($id)
  12. {
  13. return $this->where('id', $id)->value('permissions');
  14. }
  15. }