版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fujian9544/article/details/88051275
1.redict
return $this->redirect(['login']);
2.save
第一个参数是执行验证,第二个参数是指的那个字段(空的话 就保存全部)
* @param bool $runValidation whether to perform validation (calling [[validate()]])
* before saving the record. Defaults to `true`. If the validation fails, the record
* will not be saved to the database and this method will return `false`.
* @param array $attributeNames list of attribute names that need to be saved. Defaults to null,
* meaning all attributes that are loaded from DB will be saved.
* @return bool whether the saving succeeded (i.e. no validation errors occurred).
*/
public function save($runValidation = true, $attributeNames = null)