Kuu Pyaung軟件包將資源文件和數據庫從Zawgyi轉換為Unicode。
如果上下文是Unicode,請不要擔心衝突上下文,Kuu Pyaung沒有再次將Unicode上下文轉換為Unicode。
| 拉拉維爾 | 包裹 | php |
|---|---|---|
| 5.2.x | 1.x | > = 5.6.4 |
| 5.3.x | 1.x | > = 5.6.4 |
| 5.4.x | 1.x | > = 5.6.4 |
| 5.5.x | 2.x | > = 7.0.0 |
| 5.6.x | 2.x | > = 7.1.3 |
| 5.7.x | 2.x | > = 7.1.3 |
| 5.8.x | 3.x | > = 7.2.0 |
| 6.x | 3.x | > = 7.2.0 |
| 7.x | 3.x | > = 7.2.5 |
| 8.x | 4.x | > = 7.4 |
| 9.x | 5.x | > = 8.1 |
| 10.x | 5.x | > = 8.1 |
對於Laravel 8.x
composer require tintnaingwin/kuu-pyaung: " ~4.0 "對於Laravel 5.8 | 6.x | 7.x
composer require tintnaingwin/kuu-pyaung: " ~3.0 "對於Laravel 5.5 | 5.6 | 5.7
composer require tintnaingwin/kuu-pyaung: " ~2.0 "對於Laravel 5.2 | 5.3 | 5.4
composer require tintnaingwin/kuu-pyaung: " ~1.0 "對於Laravel> = 5.5就是這樣。該軟件包支持Laravel新軟件包發現。
如果您使用的是Laravel <5.5,則還需要將服務提供商類添加到項目的config/app.php文件中:
Tintnaingwin KuuPyaung KuuPyaungServiceProvider::class,您可以使用以下方式發布配置文件
php artisan vendor:publish --provider= " TintnaingwinKuuPyaungKuuPyaungServiceProvider " 您可以通過運行轉換應用程序:
php artisan kuupyaung:run如果您只想轉換文件,請運行:
php artisan kuupyaung:run --only-files如果您只想轉換數據庫,請運行:
php artisan kuupyaung:run --only-database可以在 /config/kuu-pyaung.php中直接配置kuu pyaung。
這是已發布的配置文件的內容:
return [
/*
* These resource directories only will be convert.
*/
' include_files ' => [
' views ' ,
' lang ' , // lang/my
],
/*
* These database tables will be excluded from the convert.
*/
' exclude_tables ' => [
' password_resets ' ,
' migrations ' ,
' failed_jobs ' ,
' telescope_entries ' ,
' telescope_entries_tags ' ,
' telescope_monitoring ' ,
],
/*
* These database table columns will be excluded from the convert.
*
* The value of the some columns may be filenames or you don't want to convert.
* Eg - 'table_name' => [ 'exclude_column', 'exclude_column' ]
*/
' exclude_table_columns ' => [
' users ' => [ ' profile_pic ' , ' file_path ' ],
' orders ' => [ ' invoice_path ' ]
]
];文件轉換
此軟件包在resource directories下僅轉換文件夾。您可以確定將轉換哪些資源文件。
/*
* These resource directories only will be convert.
*/
' include_files ' => [
' views ' ,
' lang ' , // lang/my
],數據庫轉換
排除表-Kuu pyaung僅從數據庫中轉換string數據類型。您可以確定將哪些表排除在轉換之外。另外,如果您的表沒有primary key (id or UUID) ,則將不會轉換此表。
/*
* These database tables will be excluded from the convert.
*/
' exclude_tables ' => [
' password_resets ' ,
' migrations ' ,
' failed_jobs ' ,
' telescope_entries ' ,
' telescope_entries_tags ' ,
' telescope_monitoring ' ,
],排除列- 如果某些列的值是Zawgyi文件名或文件路徑。您可以在配置文件中的dubl_table_columns中添加這些列。
/*
* These database table columns will be excluded from the convert.
*
* The value of the some columns may be filenames that you don't want to convert.
* Eg - 'table_name' => [ 'exclude_column', 'exclude_column' ]
*/
/*
'exclude_table_columns' => [
'users' => [ 'profile_pic', 'file_path' ],
'orders' => [ 'invoice_path' ]
]
*/我們強烈建議您在生產服務器中轉換數據庫表時使用維護模式。
您可以在以下情況下與kuu-pyaung進行轉換,
如果您使用Laravel <5.2,則第一件事
您不想安裝當前項目的第二件事。
運行測試:
composer test有關最近發生了變化的更多信息,請參見ChangElog。
請有關詳細信息,請參閱貢獻。
請有關詳細信息,請參閱貢獻。
請查看我們有關如何報告安全漏洞的安全政策。
麻省理工學院許可證(麻省理工學院)。請參閱許可證文件以獲取更多信息。