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

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

    <legend id='oeGFl'><style id='oeGFl'><dir id='oeGFl'><q id='oeGFl'></q></dir></style></legend>
  • <small id='oeGFl'></small><noframes id='oeGFl'>

      <bdo id='oeGFl'></bdo><ul id='oeGFl'></ul>

      1. Laravel eloquent 集合上的 Array_unique

        Array_unique on a laravel eloquent collection(Laravel eloquent 集合上的 Array_unique)
      2. <legend id='6w8w0'><style id='6w8w0'><dir id='6w8w0'><q id='6w8w0'></q></dir></style></legend>

          <bdo id='6w8w0'></bdo><ul id='6w8w0'></ul>

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

                  <small id='6w8w0'></small><noframes id='6w8w0'>

                • 本文介紹了Laravel eloquent 集合上的 Array_unique的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  不確定這是否可行,但我嘗試在我擁有的一組項目上運行 array_unique,以刪除重復項.雖然我無法讓它工作.

                  Not sure if this is possible but im trying to run array_unique over a collection of items i have, to remove duplicates. Although i cannot get it working.

                  我的控制器邏輯:

                      // init models
                      $jobs = Job::search();
                      $countries = $jobs->get()->map(function( $job ) {
                  
                          return $job->country;
                      });
                      $countries = array_unique( $countries->toArray() );
                  

                  雖然這會得到數組到字符串的轉換"錯誤

                  although this gets a "Array to string conversion" error

                  推薦答案

                  您可以使用 distinctgroup by 在您的選擇子句中.但是,如果您真的需要在對象數組上具有唯一值,您可以執行以下操作:

                  You can have unique values in your DB results using distinct or group by in your select clause. But, if you really need to have unique values over an array of object you can do the following:

                  $uniques = array();
                  foreach ($countries as $c) {
                      $uniques[$c->code] = $c; // Get unique country by code.
                  }
                  
                  dd($uniques);
                  

                  這篇關于Laravel eloquent 集合上的 Array_unique的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                  <tfoot id='8JwFf'></tfoot>
                    <tbody id='8JwFf'></tbody>
                • <legend id='8JwFf'><style id='8JwFf'><dir id='8JwFf'><q id='8JwFf'></q></dir></style></legend>

                  <small id='8JwFf'></small><noframes id='8JwFf'>

                      <bdo id='8JwFf'></bdo><ul id='8JwFf'></ul>

                      1. <i id='8JwFf'><tr id='8JwFf'><dt id='8JwFf'><q id='8JwFf'><span id='8JwFf'><b id='8JwFf'><form id='8JwFf'><ins id='8JwFf'></ins><ul id='8JwFf'></ul><sub id='8JwFf'></sub></form><legend id='8JwFf'></legend><bdo id='8JwFf'><pre id='8JwFf'><center id='8JwFf'></center></pre></bdo></b><th id='8JwFf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8JwFf'><tfoot id='8JwFf'></tfoot><dl id='8JwFf'><fieldset id='8JwFf'></fieldset></dl></div>
                            主站蜘蛛池模板: a免费视频 | 日日操操 | 国产成人精品一区二区三区网站观看 | 自拍偷拍第一页 | 成人网av | 亚洲精品中文字幕在线观看 | 日本a∨视频 | 国产精品区一区二区三 | 一级片在线观看 | 日日操日日干 | 亚洲一区二区三区四区视频 | 亚洲啪啪一区 | 韩国av电影网 | 91精品国产色综合久久 | 欧美一区永久视频免费观看 | 亚洲小视频在线观看 | 色综合天天天天做夜夜夜夜做 | 亚洲国产成人av好男人在线观看 | 精品一区二区三区四区五区 | 成人毛片视频免费 | 免费a v网站 | 毛片在线免费 | 日韩精品成人免费观看视频 | 午夜免费观看 | 91成人免费电影 | 国产情侣在线看 | 国产精品一级在线观看 | 中文字幕亚洲欧美日韩在线不卡 | 亚洲高清视频在线观看 | 激情三区 | 国产精品一区二区不卡 | 成人一级视频在线观看 | 毛片在线看看 | 成人国产一区二区三区精品麻豆 | 午夜合集 | 欧美日韩成人 | 岛国毛片 | 欧美视频在线看 | 一区二区三区国产精品 | 亚洲成年影院 | 香蕉91|