feat : section
This commit is contained in:
@@ -28,6 +28,7 @@ class EmployeeRequest extends FormRequest
|
|||||||
'role_id' => 'exists:admin_role,id',
|
'role_id' => 'exists:admin_role,id',
|
||||||
'avatar' => '',
|
'avatar' => '',
|
||||||
'limit' => 'required|integer',
|
'limit' => 'required|integer',
|
||||||
|
'section_id' => 'exists:admin_section,id',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ class EmployeeService extends BaseService
|
|||||||
$model->status = $this->request->input('status', 1);
|
$model->status = $this->request->input('status', 1);
|
||||||
$model->avatar = $this->request->input('avatar',0);
|
$model->avatar = $this->request->input('avatar',0);
|
||||||
$model->role_id = $this->request->input('role_id', 0);
|
$model->role_id = $this->request->input('role_id', 0);
|
||||||
|
$model->section_id = $this->request->input('section_id', 0);
|
||||||
|
|
||||||
if (!$model->save()) throw new AdminException('账号添加失败');
|
if (!$model->save()) throw new AdminException('账号添加失败');
|
||||||
|
|
||||||
@@ -113,6 +114,7 @@ class EmployeeService extends BaseService
|
|||||||
$info->status = $this->request->input('status', 1);
|
$info->status = $this->request->input('status', 1);
|
||||||
$info->avatar = $this->request->input('avatar',0);
|
$info->avatar = $this->request->input('avatar',0);
|
||||||
$info->role_id = $this->request->input('role_id', 0);
|
$info->role_id = $this->request->input('role_id', 0);
|
||||||
|
$info->section_id = $this->request->input('section_id', 0);
|
||||||
|
|
||||||
if (!$info->save()) throw new AdminException('账号修改失败');
|
if (!$info->save()) throw new AdminException('账号修改失败');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user