public function edit($id)
 {
     $curr['name'] = $this->crumb['edit']['name'];
     $curr['url'] = $this->crumb['edit']['url'];
     $result = ['data' => AdminModel::find($id), 'roleModels' => RoleModel::all(), 'crumb' => $this->crumb, 'curr' => $curr];
     return view('admin.admin.edit', $result);
 }
Exemple #2
0
 /**
  * 查询方法
  */
 public function query()
 {
     $datas = RoleModel::orderBy('id', 'asc')->paginate($this->limit);
     $datas->limit = $this->limit;
     return $datas;
 }
Exemple #3
0
 public function role()
 {
     $roleid = $this->role_id ? $this->role_id : 0;
     $roleModel = RoleModel::find($roleid);
     return $roleModel ? $roleModel->name : '';
 }