久久久久久久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 模型結果的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經(jīng)在我的 Laravel 應用程序中實現(xiàn)了 ZendSearch.我使用它作為我的搜索引擎,用戶將在其中輸入一個搜索詞,然后 ZendSearch 將返回一個按相關性排序的結果數(shù)組.但是,ZendSearch 返回的數(shù)組只返回我的記錄 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 數(shù)組結果的結果的正確方法是什么,該數(shù)組結果只是一個基于相關性排序的 ID 數(shù)組.

                  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() 方法提供一個數(shù)組我希望按照我提供的順序返回的 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]);
                  

                  順便說一下,你也可以將一個數(shù)組傳遞給 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模板網(wǎng)!

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

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環(huán))
                  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 個參數(shù))
                  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@“l(fā)ocalhost的訪問被拒絕)
                  <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>

                            主站蜘蛛池模板: 久久国产精品免费一区二区三区 | 91av免费版 | 日日操夜夜干 | 天天操操| 午夜小视频在线观看 | 成人在线一区二区 | 亚洲精品国产第一综合99久久 | 欧美一区二 | 国产不卡在线观看 | 亚洲天堂中文字幕 | www.久久国产精品 | 日韩乱码在线 | 欧美福利精品 | 在线高清免费观看视频 | 久久精品国产99国产精品 | 嫩草伊人 | 99久久久99久久国产片鸭王 | 精品免费国产一区二区三区四区介绍 | 精品国产乱码久久久久久闺蜜 | 久久久国产精品入口麻豆 | 久久国产综合 | 亚洲综合色 | 欧美成人一区二区三区 | 亚洲精品一区在线观看 | 国产精品一码二码三码在线 | 精品欧美色视频网站在线观看 | 亚洲欧美在线一区 | 久久精品高清视频 | 91精品国产乱码久久久久久久久 | 欧美日韩精品一区二区三区蜜桃 | 欧美成年人视频在线观看 | 日韩精品在线观看网站 | 天天操天天干天天透 | 欧美亚洲国产精品 | 午夜国产在线 | 精品一区二区三区电影 | 日韩aⅴ片| 亚洲午夜精品一区二区三区他趣 | 四虎永久免费地址 | 国产亚洲网站 | 在线一区视频 |