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"); + } + } + + + } /**