更新学校
This commit is contained in:
@@ -136,6 +136,7 @@ class Student extends Backend
|
||||
$area_encoded = db('area')->where('id', $info['city'])->find();
|
||||
|
||||
$params['city'] = $area_encoded['name'];
|
||||
|
||||
$result = $this->model->validateFailException()->validate('Student.add')->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
@@ -204,6 +205,7 @@ function getPicUrl($url)
|
||||
'mobile' => 'regex:1[3-9]\d{9}|unique:student,mobile,' . $row->id,
|
||||
]);
|
||||
$params['avatar'] = $this->getPicUrl($params['avatar']);
|
||||
// dump($params);die;
|
||||
$result = $row->validateFailException()->validate('Student.edit')->allowField(true)->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
|
||||
Reference in New Issue
Block a user