浏览代码

类型转换

duqinya 5 年之前
父节点
当前提交
1d924822e9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Repositories/BeanRepository.php

+ 1 - 1
app/Repositories/BeanRepository.php

@@ -76,7 +76,7 @@ class BeanRepository
                 $i = 0;
                 foreach ($all_beans as $key => $val) {
                     $new_arr[$i]['uid'] = $key;
-                    $new_arr[$i]['count'] = $val;
+                    $new_arr[$i]['count'] = intval($val);
                     $i++;
                 }
                 $uids = implode(',', array_column($new_arr, 'uid'));