xiaogang преди 3 години
родител
ревизия
16f4db0831
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      app/Admin/Actions/Users/SetUserInfo.php
  2. 1 1
      app/Admin/Actions/Users/UsersInfoForm.php

+ 1 - 1
app/Admin/Actions/Users/SetUserInfo.php

xqd
@@ -58,7 +58,7 @@ class SetUserInfo extends RowAction
 
     public function render()
     {
-        $form = UsersInfoForm::make()->payload(['user_id'=>$this->getKey()]);
+        $form = UsersInfoForm::make([],$this->getKey())->payload(['user_id'=>$this->getKey()]);
         return Modal::make()
             ->lg()
             ->title($this->title)

+ 1 - 1
app/Admin/Actions/Users/UsersInfoForm.php

xqd
@@ -15,7 +15,7 @@ class UsersInfoForm extends Form implements LazyRenderable
     public function __construct($data = [], $key = null)
     {
         parent::__construct($data, $key);
-        $this->user_info = UserInfoModel::query()->where('user_id',$this->payload['user_id'])->first();
+        $this->user_info = UserInfoModel::query()->where('user_id',$key)->first();
         $this->fill($this->user_info );
     }