<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                原文地址 https://www.workerman.net/q/7790 # 使用laravel db,listen無效 [![](https://www.workerman.net/avatar.png)**badman**](https://www.workerman.net/u/badman)10天前 參考了此帖子的回答,[https://www.workerman.net/q/7727](https://www.workerman.net/q/7727) 并未解決問題,確定是有調用對應的start方法,但是就是監聽不到sql語句。如下圖 環境(vagrant homestead) ![](https://www.workerman.net/upload/img/20220114/1461e0f173cd2d.png) 控制器代碼 ~~~php <?php namespace app\controller; use app\model\Order; use Illuminate\Database\QueryException; use support\Db; use support\Request; class User { public function index(Request $request) { // $data = Order::filter($request->all())->get(); // $data = Order::where('id',1)->first(); $data = Db::table('cz_order')->where('id','>',1)->first(); return json($data); } } ~~~ app/bootstrap/Report.php ~~~php <?php namespace app\bootstrap; use support\Db; use Webman\Bootstrap; class Report implements Bootstrap { public static function start($worker) { echo "Report start被調用啦~\n"; Db::listen(function(\Illuminate\Database\Events\QueryExecuted $query) { echo $query->sql. "\n"; }); } } ~~~ config/bootstrap.php ~~~php <?php return [ support\bootstrap\Session::class, support\bootstrap\LaravelDb::class, \app\bootstrap\Report::class, ]; ~~~ 執行`composer require illuminate/events`,然后restart重啟試下
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看