<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                中間件是在請求具體的**操作之前****還是之后執行**,完全取決于中間件的定義本身 下面是一個前置行為的中間件 代碼執行前執行 ~~~ 1 <?php 2 3 namespace app\middleware; 4 5 class Before 6 { 7 public function handle($request, \Closure $next) 8 { 9 // 添加中間件執行代碼 10 11 return $next($request); 12 } 13 } ~~~ 下面是一個后置行為的中間件 代碼執行后執行 ~~~ <?php namespace app\middleware; class After { public function handle($request, \Closure $next) { $response = $next($request); // 添加中間件執行代碼 return $response; } } ~~~ 后置中間件可以獲取當前控制器名和方法名 可用于后臺權限管理 ~~~ <?php declare (strict_types = 1); namespace app\index\middleware; use think\facade\Session; class Show { public function handle($request, \Closure $next) { $response = $next($request); dump(request()->controller().'/'.request()->action()); $url = request()->controller().'/'.request()->action(); if (!Session::has('member_name')){ $currenturl = ['Product/product']; if (in_array($url,$currenturl)){ return redirect((string)url('Login/login')); } } return $response; } } ~~~ ![](https://img.kancloud.cn/90/ab/90abb50c7b46c8851bf277b2b2d56b69_1890x401.png) ![](https://img.kancloud.cn/e7/fa/e7fa0635468349493f3f135ea4a9a8e4_1907x845.png)
                  <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>

                              哎呀哎呀视频在线观看