Answer the question
In order to leave comments, you need to log in
Why is the field not available from the model?
Tell me plz.
I'm in the model, in the rules I attributed the fields to required. After model->load in the controller, they are available as model->pole , if not registered, they are not available, why?
Answer the question
In order to leave comments, you need to log in
load() only works on the fields you specify for the current scenario. If you do not specify a script explicitly, then only those fields for which validation rules are specified are used. Read about scripting here: www.yiiframework.com/doc-2.0/guide-structure-model...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question