From 0058f02e828ca848581271cc514701a0be9cd7c4 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 28 Oct 2017 06:23:04 -0700 Subject: [PATCH] =?UTF-8?q?Closure=20wasn=E2=80=99t=20working,=20go=20trad?= =?UTF-8?q?itional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...27_192423_migrate_denormed_asset_locations.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php b/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php index 0d9f2c8cfd..accc3e34bb 100644 --- a/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php +++ b/database/migrations/2017_10_27_192423_migrate_denormed_asset_locations.php @@ -70,13 +70,16 @@ class MigrateDenormedAssetLocations extends Migration \Log::info('Asset: '.$unassigned_asset->id.' still has no location'); } - Asset::get()->each(function ($asset) { - if (($asset) && ($asset->location_id != $asset->assetLoc()->id)) { - \Log::info('MISMATCH MISMATCH '.$asset->id. "doesn't match its location"); - } - }); + $assets = Asset::get(); - die(); + foreach ($assets as $asset) { + if (($asset) && ($asset->location_id != $asset->assetLoc()->id)) { + \Log::info('MISMATCH MISMATCH '.$asset->id. "doesn't match its location"); + } + } + + + } /**