From dd75a819d4dada7ee61017ef0bc3b8fbb1c3fb29 Mon Sep 17 00:00:00 2001 From: liapples Date: Mon, 18 Oct 2021 13:35:00 +0800 Subject: [PATCH] =?UTF-8?q?info=20json=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AdminAgent/Forms/IndustryProductBuy.php | 2 +- app/Models/IndustryOrder.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/AdminAgent/Forms/IndustryProductBuy.php b/app/AdminAgent/Forms/IndustryProductBuy.php index 2245526..2cfd15a 100644 --- a/app/AdminAgent/Forms/IndustryProductBuy.php +++ b/app/AdminAgent/Forms/IndustryProductBuy.php @@ -98,7 +98,7 @@ class IndustryProductBuy extends Form 'created_at' => now(), 'prepay_price' => $prepay_price, 'single_price' => $industry->single_deposit, - 'info' => json_encode($input['info']), + 'info' => $input['info'], ]); DB::commit(); diff --git a/app/Models/IndustryOrder.php b/app/Models/IndustryOrder.php index e199fdc..c0072f1 100644 --- a/app/Models/IndustryOrder.php +++ b/app/Models/IndustryOrder.php @@ -10,6 +10,7 @@ class IndustryOrder extends BaseModel use HasDateTimeFormatter; use SoftDeletes; + protected $casts = ['info' => 'json']; protected $guarded = ['id']; public function supplier()