eschmar/laravel-table-dictionary

此包最新版本(0.1.0)没有可用的许可证信息。

生成数据库列可能值的字典,以扩展您的数据集。

0.1.0 2018-06-11 13:28 UTC

This package is auto-updated.

Last update: 2024-09-11 20:07:44 UTC


README

引入了 TableDictionary 数据结构,该结构能够提取数据库列内容的统计分布。此分布可用于生成更多相同的内容,利用彩票系统。通过静态函数暴露了 TableDictionaryService,以生成当前数据库表的 TableDictionary 数据结构,并在另一个环境中导入它们。

用法

// Sample usage
$dict = new TableDictionary("table_name");
$dict->generate("attribute_name");

// Persist dictionary
TableDictionaryService::writeDictionary($dict);

// Retrieve dictionary
TableDictionaryService::writeDictionary($dict);
$dict = TableDictionaryService::getDictionary("table_name");