<?php 
namespace Modules\Seo\Controllers\Services;

use Illuminate\Support\Facades\DB;

class RssHelperService
{
    public static function getRssProductAttachData($lightProducts)
    {
        $productIds = [];
        for ($i = 0; $i < count($lightProducts); $i++) { 
            $productIds[] = $lightProducts[$i]['id'];
        }
        return DB::table('product')
            ->whereIn('id', $productIds)
            ->select(['id', 'description', 'created_at', 'content'])
            ->get()
            ->toArray();
    }
}