public static function getBlockData($blockId, $versionId, $repeaterId, $repeaterRowId) { $repeaterRowKey = PageBlockRepeaterRows::getRowKey($repeaterId, $repeaterRowId); $getDataQuery = static::where('block_id', '=', $blockId)->where('row_key', '=', $repeaterRowKey)->where('language_id', '=', Language::current()); if (!empty($versionId)) { $getDataQuery = $getDataQuery->where('version', '<=', $versionId); } $blockData = $getDataQuery->orderBy('version', 'desc')->first(); return $blockData ? $blockData->content : null; }