| 1234567891011121314151617181920212223 |
- <?php
- declare(strict_types=1);
- namespace SixShop\System\Hook;
- use SixShop\Core\Attribute\Hook;
- use SixShop\System\Middleware\AppendSqlDebugMiddleware;
- use think\App;
- use think\event\HttpRun;
- class DebugHook
- {
- public function __construct(private App $app)
- {
- }
- #[Hook(HttpRun::class)]
- public function appendSqlDebug(): void
- {
- $this->app->middleware->add(AppendSqlDebugMiddleware::class);
- }
- }
|