Good evening,
I can not use the Yii software for several months because of the following error:
Unknown Property - yii \ base \ UnknownPropertyException Getting unknown property: app \ models \ youSearch :: E 1. in C: \ xampp \ htdocs \ yii2basic \ vendor \ yiisoft \ yii2 \ base \ Component.php at line 147
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 if ($ behavior-> canGetProperty ($ name)) { return $ behavior- > $ name; } }
if (method_exists($this, 'set' . $name)) {
throw new InvalidCallException('Getting write-only property: ' . get_class($this) . '::' . $name);
}
throw new UnknownPropertyException('Getting unknown property: ' . get_class($this) . '::' . $name);
}
/**
* Sets the value of a component property.
* This method will check in the following order and act accordingly:
*
* - a property defined by a setter: set the property value
* - an event in the format of "on xyz": attach the handler to the event "xyz"
* - a behavior in the format of "as xyz": attach the behavior named as "xyz"
2. in C: \ xampp \ htdocs \ yii2basic \ vendor \ yiisoft \ yii2 \ db \ BaseActiveRecord.php at line 286 - yii \ base \ Component :: __ get ('E') 3. in C: \ xampp \ htdocs \ yii2basic \ models \ youSearch.php at line 66 - yii \ db \ BaseActiveRecord :: __ get ('E')
60 61 62 63 64 65 66 67 68 69 70 // grid filtering conditions $ query-> andFilterWhere ([ 'id' = > $ this-> id, ]);
$query->andFilterWhere(['like', 'Nome', $this->Nome])
->andFilterWhere(['like', 'E-mail', $this->E-mail]);
return $dataProvider;
}
} 4. in C: \ xampp \ htdocs \ yii2basic \ controllers \ YouController.php at line 39 - app \ models \ youSearch :: search (['r' = > 'you / index'])
33 34 35 36 37 38 39 40 41 42 43 44 45 * Lists all you models. * @return mixed * / public function actionIndex () { $ searchModel = new youSearch (); $ dataProvider = $ searchModel-> search (Yii :: $ app-> query-> queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
5.
app \ controllers \ YouController :: actionIndex () 6. in C: \ xampp \ htdocs \ yii2basic \ vendor \ yiisoft \ yii2 \ base \ InlineAction.php at line 57 - call_user_func_array ([app \ controllers \ YouController, 'actionIndex'], [])
51 52 53 54 55 56 57 58 59 $ args = $ this- > controller-> bindActionParams ($ this, $ params); Yii :: trace ('Running action:'. Get_class ($ this-> controller). ';'. $ This-> actionMethod. '()', METHOD ); if (Yii :: $ app-> requestedParams === null) { Yii :: $ app-> requestedParams = $ args; }
return call_user_func_array([$this->controller, $this->actionMethod], $args);
}
} 7. in C: \ xampp \ htdocs \ yii2basic \ vendor \ yiisoft \ yii2 \ base \ Controller.php at line 156 - yii \ base \ InlineAction :: runWithParams (['r' = > 'you / index'])
150 151 152 153 154 155 156 157 158 159 160 161 162 }
$result = null;
if ($runAction && $this->beforeAction($action)) {
// run the action
$result = $action->runWithParams($params);
$result = $this->afterAction($action, $result);
// call afterAction on modules
foreach ($modules as $module) {
/* @var $module Module */
8. in C: \ xampp \ htdocs \ yii2basic \ vendor \ yiisoft \ yii2 \ base \ Module.php at line 523 - yii \ base \ Controller :: runAction ('index', ['r' = > 'you / index'])
517 518 519 520 521 522 523 524 525 526 527 528 529 $ parts = $ this-> createController ($ route); if (is_array ($ parts)) { / * @var $ controller Controller * / list ($ controller, $ actionID) = $ parts; $ oldController = Yii :: $ app-> controller; Yii :: $ app-> controller = $ controller; $ result = $ controller-> runAction ($ actionID, $ params); if ($ oldController! == null) { Yii :: $ app-> controller = $ oldController; }
return $result;
}
9. in C: \ xampp \ htdocs \ yii2basic \ vendor \ yiisoft \ yii2 \ web \ Application.php at line 102 - yii \ base \ Module :: runAction ('you / index', ['r' = > 'you / index'])
96 97 98 99 100 101 102 103 104 105 106 107 108 $ params = $ this-> catchAll; unset ($ params [0]); } try { Yii :: trace ("Route requested: '$ route'", METHOD ); $ this- > requestedRoute = $ route; $ result = $ this-> runAction ($ route, $ params); if ($ result instanceof Response) { return $ result; } else { $ response = $ this-> getResponse (); if ($ result! == null) { $ response-> data = $ result; 10. in C: \ xampp \ htdocs \ yii2basic \ vendor \ yiisoft \ yii2 \ base \ Application.php at line 380 - yii \ web \ Application :: handleRequest (yii \ web \ Request)
374 375 376 377 378 379 380 381 382 383 384 385 386 try {
$this->state = self::STATE_BEFORE_REQUEST;
$this->trigger(self::EVENT_BEFORE_REQUEST);
$this->state = self::STATE_HANDLING_REQUEST;
$response = $this->handleRequest($this->getRequest());
$this->state = self::STATE_AFTER_REQUEST;
$this->trigger(self::EVENT_AFTER_REQUEST);
$this->state = self::STATE_SENDING_RESPONSE;
$response->send();
11. in C: \ xampp \ htdocs \ yii2basic \ web \ index.php at line 12 - yii \ base \ Application :: run ()
6 7 8 9 10 11 12
require ( DIR . '/../vendor/autoload.php');
$ config = require ( DIR . '/../ config / web.php');
(new yii \ web \ Application ($ config)) -> run (); $ _GET = [ 'r' = > 'you / index', ];
$ _COOKIE = '_csrf' = > '3b5f68c032a757f50362118af4f7dbe99c4f8edb6c59634088c86586a0c773a5a: 2: {i: 0; s: 5: "_ csrf"; i: 1; s: 32: "- 8SgE6myM5wjc1W4Cr3fk4MlcCoJoVwk";}', ];
Can you help me?