久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <i id='z4cid'><tr id='z4cid'><dt id='z4cid'><q id='z4cid'><span id='z4cid'><b id='z4cid'><form id='z4cid'><ins id='z4cid'></ins><ul id='z4cid'></ul><sub id='z4cid'></sub></form><legend id='z4cid'></legend><bdo id='z4cid'><pre id='z4cid'><center id='z4cid'></center></pre></bdo></b><th id='z4cid'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='z4cid'><tfoot id='z4cid'></tfoot><dl id='z4cid'><fieldset id='z4cid'></fieldset></dl></div>
    1. <tfoot id='z4cid'></tfoot>

      <legend id='z4cid'><style id='z4cid'><dir id='z4cid'><q id='z4cid'></q></dir></style></legend>
    2. <small id='z4cid'></small><noframes id='z4cid'>

        • <bdo id='z4cid'></bdo><ul id='z4cid'></ul>

        基于多個 ID 檢索 Laravel 模型結果

        Retrieve Laravel Model results based on multiple ID#39;s(基于多個 ID 檢索 Laravel 模型結果)
          <tbody id='ZJcaJ'></tbody>
      1. <legend id='ZJcaJ'><style id='ZJcaJ'><dir id='ZJcaJ'><q id='ZJcaJ'></q></dir></style></legend>
        <i id='ZJcaJ'><tr id='ZJcaJ'><dt id='ZJcaJ'><q id='ZJcaJ'><span id='ZJcaJ'><b id='ZJcaJ'><form id='ZJcaJ'><ins id='ZJcaJ'></ins><ul id='ZJcaJ'></ul><sub id='ZJcaJ'></sub></form><legend id='ZJcaJ'></legend><bdo id='ZJcaJ'><pre id='ZJcaJ'><center id='ZJcaJ'></center></pre></bdo></b><th id='ZJcaJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZJcaJ'><tfoot id='ZJcaJ'></tfoot><dl id='ZJcaJ'><fieldset id='ZJcaJ'></fieldset></dl></div>

        • <small id='ZJcaJ'></small><noframes id='ZJcaJ'>

              <tfoot id='ZJcaJ'></tfoot>
                <bdo id='ZJcaJ'></bdo><ul id='ZJcaJ'></ul>

                  本文介紹了基于多個 ID 檢索 Laravel 模型結果的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經在我的 Laravel 應用程序中實現了 ZendSearch.我使用它作為我的搜索引擎,用戶將在其中輸入一個搜索詞,然后 ZendSearch 將返回一個按相關性排序的結果數組.但是,ZendSearch 返回的數組只返回我的記錄 ID(它不返回任何實際的記錄信息).

                  I have implemented ZendSearch into my Laravel application. I am using it as my search engine where users will type a search word, and then ZendSearch will return me an array of results ordered by relevance. However, the array that ZendSearch returns, only returns my record ID's (it doesn't return any of the actual record information).

                  接下來查詢我的模型以檢索基于 ZendSearch 數組結果的結果的正確方法是什么,該數組結果只是一個基于相關性排序的 ID 數組.

                  What would next be the correct way to query my Model to retrieve the results based on the ZendSearch array results which is just an array of ID's ordered based on relevance.

                  我知道 Model::find(1) 會返回我的 ID 為 1 的記錄,但是我如何為 find() 方法提供一個數組我希望按照我提供的順序返回的 ID.

                  I know of Model::find(1) which would return my record with an ID of 1, but how can I feed that find() method an array of ID's that I want to be returned in the order I am giving it.

                  推薦答案

                  這很簡單.使用 findMany:

                  $models = Model::findMany([1, 2, 3]);
                  

                  順便說一下,你也可以將一個數組傳遞給 find(),它會在內部調用 findMany:

                  By the way, you can also pass an array to find() and it will internally call findMany:

                  $models = Model::find([1, 2, 3]);
                  

                  <小時>

                  在引擎蓋下它只是做了一個 whereIn 所以你也可以這樣做:


                  Under the hood it just does a whereIn so you could do that too:

                  $models = Model::whereIn('id', [1, 2, 3])->get();
                  

                  這篇關于基于多個 ID 檢索 Laravel 模型結果的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)
                  <i id='mv8QX'><tr id='mv8QX'><dt id='mv8QX'><q id='mv8QX'><span id='mv8QX'><b id='mv8QX'><form id='mv8QX'><ins id='mv8QX'></ins><ul id='mv8QX'></ul><sub id='mv8QX'></sub></form><legend id='mv8QX'></legend><bdo id='mv8QX'><pre id='mv8QX'><center id='mv8QX'></center></pre></bdo></b><th id='mv8QX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mv8QX'><tfoot id='mv8QX'></tfoot><dl id='mv8QX'><fieldset id='mv8QX'></fieldset></dl></div>
                  <tfoot id='mv8QX'></tfoot>
                      <bdo id='mv8QX'></bdo><ul id='mv8QX'></ul>

                        <legend id='mv8QX'><style id='mv8QX'><dir id='mv8QX'><q id='mv8QX'></q></dir></style></legend>

                        <small id='mv8QX'></small><noframes id='mv8QX'>

                            <tbody id='mv8QX'></tbody>

                            主站蜘蛛池模板: 一区二区三区四区国产 | 国产精品一码二码三码在线 | 免费毛片www com cn | 在线国产一区 | 91av在线免费播放 | 久久精品91久久久久久再现 | 国产一级电影在线 | 99re视频 | 日韩av在线一区二区 | 国产在线精品一区 | 国产精品视频一区二区三 | 亚洲一区二区三区在线观看免费 | 91精品国产欧美一区二区 | 亚洲一二视频 | 成人亚洲视频 | 国产精品久久久久免费 | 国产精品1区 | 久久激情视频 | 国产情侣啪啪 | 久久国产欧美日韩精品 | 国产成人免费网站 | 日韩在线播放网址 | 久久机热| 一区二区三区不卡视频 | 罗宾被扒开腿做同人网站 | 色婷婷综合久久久久中文一区二区 | 成人精品在线 | 国产欧美一区二区三区国产幕精品 | 婷婷丁香在线视频 | 亚洲二区在线观看 | 鸳鸯谱在线观看高清 | 每日更新av | 久久久久久久久91 | 国产精品美女久久久久久久久久久 | 精品欧美一区二区三区久久久小说 | 久久精品一 | www亚洲精品 | 国产黄色一级电影 | 你懂的在线视频播放 | 国产日韩一区二区三免费高清 | 国产精品久久久久国产a级 欧美日本韩国一区二区 |