I have a very large code I twist, to make it more readable, I part of the code I put into another file and then insert it into the twist.
In the main view, I connect the model use app\models\options; then below the code I connect the file (template) in this way:
<?php require '../library/site_templ/event/add_event_editor.php'; ?> An error occurs in this pattern:
Class 'options' not found
It turns out that after carrying out a part of the code, should I also take out and announcements of all models, etc.? After all, I announced the model in the parent view, why connect it again?