Answer the question
In order to leave comments, you need to log in
Why doesn't the model see the GET parameter?
There is a model
class SearchForm extends Model
{
public $age;
}
$model = new SearchForm();
if ($model->load(Yii::$app->request->get())) {
die($model->age); // пусто
}
Answer the question
In order to leave comments, you need to log in
Is the age attribute in the validation rules marked safe for mass assignment? Try adding [['age'], 'safe'] to your validation rules.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question