I'm a beginner. I did everything exactly according to the guide, and for a long time I can not otdebezhit error. http://www.yiiframework.com/doc-2.0/guide-start-gii.html Here is the guide itself.

Honestly, I don’t even know what information I need to drop here so that you can understand exactly how to correct errors. Since I have not quite figured out the framework yet.

In theory, the entire code should have been generated by gii, so the very appearance of the error really surprised me. The syntax of the language is still poorly known, so I did not understand where to declare this variable. enter image description here

  • Show what you have in the file controllers / CountryController.php - Bookin

1 answer 1

Well, my friend, you would learn the language first, and then you would take it for frameworks. The error here is that there is no variable declared that you are trying to spin in a loop. Declare it, it will probably be a sample from the base, and everything will work. It must be transferred from the controller using the render method. Where return $ this-> render ('index', ....