【发布时间】:2018-12-16 06:18:45
【问题描述】:
这里是迁移文件,我在mysql数据库中存储了两个数字作为json,[“1234”,“4568”]。 像这样的O/P 我得到的是 "[\"1234\", \"5678\"]" 但我需要打印 1234,5678
public function up()
{
Schema::create('store', function (Blueprint $table) {
$table->increments('id');
$table->json('store_numbers');
});
}
//刀片视图
@foreach($stores as $store)
<tr>
<td>{{ $store->store_id }}</td>
<td>{{ json_encode($store->store_numbers)}}</td>
</tr>
@endforeach
【问题讨论】: