This commit is contained in:
James Cole
2020-02-08 12:59:43 +01:00
parent cebc0d7568
commit 4cd642b8da
2 changed files with 6 additions and 5 deletions

View File

@@ -240,7 +240,7 @@ class PiggyBankController extends Controller
foreach ($collection as $piggy) {
$array = $transformer->transform($piggy);
$account = $accountTransformer->transform($piggy->account);
$accountId = $account['id'];
$accountId = (int)$account['id'];
if (!isset($accounts[$accountId])) {
// create new:
$accounts[$accountId] = $account;