NotFoundController.php 413 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: shenyang
  5. * Date: 2018/7/12
  6. * Time: 下午3:35
  7. */
  8. namespace app\frontend\controllers;
  9. use app\common\components\ApiController;
  10. use app\common\exceptions\NotFoundException;
  11. class NotFoundController extends ApiController
  12. {
  13. /**
  14. * @throws NotFoundException
  15. */
  16. public function index(){
  17. throw new NotFoundException('不存在的页面');
  18. }
  19. }