Demo.php 492 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace addons\example\controller;
  3. use think\addons\Controller;
  4. /**
  5. * 测试控制器
  6. */
  7. class Demo extends Controller
  8. {
  9. protected $layout = 'default';
  10. protected $noNeedLogin = ['index', 'demo1'];
  11. protected $noNeedRight = ['*'];
  12. public function index()
  13. {
  14. return $this->view->fetch();
  15. }
  16. public function demo1()
  17. {
  18. return $this->view->fetch();
  19. }
  20. public function demo2()
  21. {
  22. return $this->view->fetch();
  23. }
  24. }