option('model_name'))->first(); if($assetModel){ $assets = Asset::where('model_id', '=', $assetModel->id)->get(); foreach ($assets as $asset) { $asset->eol_explicit = 0; $asset->asset_eol_date = null; $asset->save(); } $this->info($assets->count().' Assets updated successfully'); } else { $this->error('Asset model not found'); } } }