xiaogang hace 3 años
padre
commit
37c24ec02a
Se han modificado 1 ficheros con 22 adiciones y 3 borrados
  1. 22 3
      app/Admin/Actions/Users/UsersInfoForm.php

+ 22 - 3
app/Admin/Actions/Users/UsersInfoForm.php

xqd
@@ -40,9 +40,28 @@ class UsersInfoForm extends Form implements LazyRenderable
     {
         $user_info = UserInfoModel::query()->where('user_id',$this->payload['user_id'])->first();
         $this->fill($user_info);
-        $this->text('user_id',"用户ID");//->value($this->user_info->user_id)->readOnly();
-        $this->text('nickname', '昵称');//->value($this->user_info->nickname);
-        $this->image('avatar', '头像');//->view($this->user_info->avatar);
+        $this->text('user_id',"用户ID")->readOnly();
+        $this->text('nickname', '昵称')->required();
+        $this->image('avatar', '头像')->uniqueName()->removable(false);
+        $this->text('weixin', '微信号');
+        $this->text('birthday', '生日');
+        $this->text('height', '身高');
+        $this->text('weight', '体重');
+        $this->text('work', '职业');
+        $this->text('info', '个人简介');
+        $this->text('area', '所在地区')->default("成都市");
+        $this->text('figure', '身材');
+        $this->text('feeling', '感情状态');
+        $this->text('education', '学历');
+        $this->text('income', '年收入');
+        $this->text('hobby', '兴趣爱好')->help("多个字段用,隔开,例如:唱歌,跳舞");
+        $this->text('hobby', '兴趣爱好')->help("多个字段用,隔开,例如:唱歌,跳舞");
+        $this->text('drink', '喝酒');
+        $this->text('smoke', '抽烟');
+        $this->array('photo', function ($form) {
+            $form->image('url','图片')->uniqueName()->removable(false);
+            $form->radio('state','阅后即焚')->options([0=>"否",1=>"是"]);
+        })->saveAsJson()->label('相册');
 
     }
 }