| xqd
@@ -118,9 +118,9 @@ class UserController extends AdminController
|
|
|
$form->text('city','所在城市')->default("成都市");
|
|
|
$form->radio('online','在线状态')->options([0=>'离线',1=>'在线'])->default(1);
|
|
|
$form->switch('status','状态')->default(1);
|
|
|
- $form->saving(function ($res){
|
|
|
+ $form->saving(function ($res)use ($form){
|
|
|
if(User::query()->where('mobile',$res->mobile)->first()){
|
|
|
- return $res->error("手机号已存在");
|
|
|
+ return $form->response()->error('手机号已存在');
|
|
|
}
|
|
|
});
|
|
|
return $form;
|