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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ## 安裝分頁組件 ~~~ composer require hyperf/paginator ~~~ ## 模型分頁 ~~~ public function index2(RenderInterface $render) { $links = Link::query()->paginate(10); //$links = Link::query()->where('id', '>', 30)->paginate(10); return $render->render('index.index', ['links' => $links]); } ~~~ ## View中分頁顯示 ~~~ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Hyperf</title> </head> <body> <ul> @foreach($links as $link) <li>{{$link->name}}</li>s @endforeach </ul> {!! \App\Util\CommonUtil::page($links) !!} </body> </html> ~~~ ## 分頁顯示助手類 > 路徑:App\Util\CommonUtil.php ~~~ declare (strict_types=1); namespace App\Util; class CommonUtil{ public static function page($paginator){ $str = '<a href="'.$paginator->url(1).'">首頁</a>'; $str .= '<a href="'.$paginator->previousPageUrl().'">上一頁</a>'; $str .= '<a href="'.$paginator->nextPageUrl().'">下一頁</a>'; $lastPageNum = intval(ceil($paginator->total() / $paginator->perPage())); //尾頁數 $str .= '<a href="'.$paginator->url($lastPageNum).'">尾頁</a>共:'.$paginator->total().'條'; return $str; } } ~~~
                  <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>

                              哎呀哎呀视频在线观看