123456789101112131415161718192021222324252627 |
- <?php
- declare(strict_types=1);
- /**
- * This file is part of Hyperf.
- *
- * @link https://www.hyperf.io
- * @document https://hyperf.wiki
- * @contact group@hyperf.io
- * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
- */
- namespace App\Controller;
- use Hyperf\HttpServer\Annotation\GetMapping;
- use Hyperf\View\RenderInterface;
- use App\Controller\AbstractController;
- //#[Controller]
- class IndexController extends AbstractController
- {
- // #[GetMapping(path: "/")]
- public function index(RenderInterface $render)
- {
- return $render->render('index.tpl', [ // 明确指定.tpl扩展名
- 'title' => 'Hello Hyperf111111111'
- ]);
- }
- }
|