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

  • <tfoot id='hwcDE'></tfoot>

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

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

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

        無法 json_encode() 數組或 Laravel 集合:“不支持類型

        Can#39;t json_encode() an array or Laravel collection: quot;Type is not supportedquot;(無法 json_encode() 數組或 Laravel 集合:“不支持類型)

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

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

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

                • <tfoot id='BYLop'></tfoot>
                    <tbody id='BYLop'></tbody>
                  本文介紹了無法 json_encode() 數組或 Laravel 集合:“不支持類型"的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我不知道我做錯了什么,因為它適用于應用程序中的所有其他模型.我多次刷新并重新播種數據庫.這些模型擴展了相同的抽象方法.

                  I don't know what I'm doing wrong since it works with all the other models in the app. I refreshed and reseeded the database multiple times. The models extend the same abstract methods.

                  這是控制器中的代碼:

                  $substrates = $this->substrates->all()->toArray();
                  $temp = json_encode($substrates);
                  dd($temp, json_last_error(), json_last_error_msg(), $substrates);
                  

                  這是 dd() 輸出:

                  This is the dd() output:

                  false
                  8
                  "Type is not supported"
                  
                  array:119 [▼
                  
                    0 => array:21 [▼
                  
                      "id" => 1
                      "name" => "Wood Free"
                      "machine_id" => 2
                      "classification" => "Cover"
                      "origins" => "Coming Soon"
                      "duplex" => true
                      "color" => "Translucents"
                      "texture" => "Leather"
                      "finish" => "Felt"
                      "product_type" => "Sheet"
                      "caliper" => "0.06"
                      "m_weight" => 70
                      "width" => "46.40"
                      "height" => "32.00"
                      "pic" => stream resource @17 ?}
                      "price" => "0.30"
                      "created_by" => 38
                      "updated_by" => 16
                      "deleted_at" => null
                      "created_at" => "2018-01-27 08:00:11"
                      "updated_at" => "2018-01-27 08:00:11"
                    ]
                  
                    1 => array:21 [?] ....
                  

                  當我使用 JSON_PARTIAL_OUTPUT_ON_ERROR 時,我得到一個 json 字符串.

                  When I use JSON_PARTIAL_OUTPUT_ON_ERROR I get a json string.

                  推薦答案

                  錯誤的原因是你在 pic 中存儲了一個 stream 資源無法序列化為 JSON 的序列化對象的字段.

                  The reason for the error is the fact, that you're storing a stream resource in pic field of the serialised object that can't be serialised to JSON.

                  您可以通過在模型中設置 $hidden 屬性來告訴 Eloquent 模型在將所選屬性轉換為數組時跳過它們:

                  You can tell Eloquent model to skip selected attributes when they're converted to an array by setting a $hidden attribute in your model:

                  class Substrate extends Model {
                    protected $hidden = ['pic'];
                  }
                  

                  這篇關于無法 json_encode() 數組或 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='d0T1B'><tr id='d0T1B'><dt id='d0T1B'><q id='d0T1B'><span id='d0T1B'><b id='d0T1B'><form id='d0T1B'><ins id='d0T1B'></ins><ul id='d0T1B'></ul><sub id='d0T1B'></sub></form><legend id='d0T1B'></legend><bdo id='d0T1B'><pre id='d0T1B'><center id='d0T1B'></center></pre></bdo></b><th id='d0T1B'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='d0T1B'><tfoot id='d0T1B'></tfoot><dl id='d0T1B'><fieldset id='d0T1B'></fieldset></dl></div>

                        <tbody id='d0T1B'></tbody>
                          <bdo id='d0T1B'></bdo><ul id='d0T1B'></ul>
                          <tfoot id='d0T1B'></tfoot>

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

                        • <legend id='d0T1B'><style id='d0T1B'><dir id='d0T1B'><q id='d0T1B'></q></dir></style></legend>
                          1. 主站蜘蛛池模板: 一区二区三区精品在线 | 欧美成人免费在线 | 国产日韩欧美 | 亚洲中国字幕 | 一区二区三区四区在线视频 | 午夜欧美一区二区三区在线播放 | 黄色免费网址大全 | 五月天综合影院 | 欧美舔穴 | 日本精品一区二区三区在线观看 | www.日韩| 久久av一区 | 一级a性色生活片久久毛片波多野 | 天堂资源 | 成人欧美一区二区三区黑人孕妇 | 成人免费视频 | 成人精品一区 | 91综合网 | 看亚洲a级一级毛片 | 又黄又色 | 国产成人免费视频网站视频社区 | 91秦先生艺校小琴 | 精品久久影院 | 免费一区二区在线观看 | 大吊一区二区 | 国产99久久精品一区二区300 | 精品久久久久一区二区国产 | 久久三区| 亚洲一区二区高清 | 欧美成人精品一区二区男人看 | 韩日一区二区三区 | 亚洲国产成人精品女人久久久 | 国产午夜精品久久久 | 国精品一区二区 | 激情五月婷婷在线 | 秋霞在线一区 | 欧美激情久久久 | 成人福利电影 | 欧美a√ | 精品视频在线观看 | 国产精品国产精品国产专区不片 |