diff --git a/README.md b/README.md index 649677f..9403985 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ public function actions() 'class' => TargetSettingAction::class, 'modelClass' => 'app\models\SiteForm', //'scenario' => 'site', // Change if you want to re-use the model for multiple setting form. - //'targetType' => 'company', // By default use 'user' + //'targetType' => 'company', // By default use '' //'targetId' => 1, // By default use \Yii::$app->user->id 'viewName' => 'site-settings', // The form we need to render 'successMessage' => '保存成功' diff --git a/src/TargetSettingAction.php b/src/TargetSettingAction.php index 5138749..ed47765 100644 --- a/src/TargetSettingAction.php +++ b/src/TargetSettingAction.php @@ -29,9 +29,9 @@ class TargetSettingAction extends Action public $viewName = 'target-setting'; /** - * @var string target id. Default is user + * @var string target type. */ - public $targetType = 'user'; + public $targetType = ''; /** * @var int target id. Default Yii::$app->user->id