controller.stub 450 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace {%controllerNamespace%};
  3. use app\common\controller\Backend;
  4. /**
  5. * {%tableComment%}
  6. *
  7. */
  8. class {%controllerName%} extends Backend
  9. {
  10. /**
  11. * {%modelName%}模型对象
  12. * @var \{%modelNamespace%}\{%modelName%}
  13. */
  14. protected $model = null;
  15. {%controllerAttr%}
  16. public function initialize()
  17. {
  18. parent::initialize();
  19. $this->model = new \{%modelNamespace%}\{%modelName%};
  20. }
  21. {%methods%}
  22. }