| xqd
@@ -6,6 +6,7 @@ use App\Models\UserInfoModel;
|
|
|
use Dcat\Admin\Contracts\LazyRenderable;
|
|
|
use Dcat\Admin\Traits\LazyWidget;
|
|
|
use Dcat\Admin\Form;
|
|
|
+use Illuminate\Database\Eloquent\Model;
|
|
|
use PHPUnit\Util\Exception;
|
|
|
|
|
|
class UsersInfoForm extends Form implements LazyRenderable
|
| xqd
@@ -41,11 +42,13 @@ class UsersInfoForm extends Form implements LazyRenderable
|
|
|
|
|
|
public function form()
|
|
|
{
|
|
|
- $user_info = UserInfoModel::query()->where('user_id',$this->payload['id'])->first();
|
|
|
- $this->model($user_info);
|
|
|
- $this->text('user_id')->value($this->payload['id'])->readOnly();
|
|
|
- $this->text('nickname', '昵称');
|
|
|
- $this->image('avatar', '头像');
|
|
|
+ $form = new Form(new UserInfoModel());
|
|
|
+
|
|
|
+ // $user_info = UserInfoModel::query()->where('user_id',$this->payload['id'])->first();
|
|
|
+ //$this->model($user_info);
|
|
|
+ $form->text('user_id')->value($this->payload['id'])->readOnly();
|
|
|
+ $form->text('nickname', '昵称');
|
|
|
+ $form->image('avatar', '头像');
|
|
|
|
|
|
}
|
|
|
}
|