แพ็คเกจ Kuu Pyaung แปลงไฟล์ทรัพยากรและฐานข้อมูลจาก Zawgyi เป็น Unicode
หากบริบทเป็น Unicode ไม่ต้องกังวลเกี่ยวกับบริบทความขัดแย้ง Kuu Pyaung ไม่ได้แปลงบริบท Unicode เป็น Unicode อีกครั้ง
| Laravel | บรรจุุภัณฑ์ | 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,คุณสามารถเผยแพร่ไฟล์ config ด้วย:
php artisan vendor:publish --provider= " TintnaingwinKuuPyaungKuuPyaungServiceProvider " คุณสามารถแปลงแอปของคุณโดยใช้งาน:
php artisan kuupyaung:runหากคุณต้องการแปลงเฉพาะไฟล์ให้เรียกใช้:
php artisan kuupyaung:run --only-filesหากคุณต้องการแปลงเฉพาะฐานข้อมูลให้เรียกใช้:
php artisan kuupyaung:run --only-databasekuu pyaung สามารถกำหนดค่าโดยตรงใน /config/kuu-pyaung.php
นี่คือเนื้อหาของไฟล์กำหนดค่าที่เผยแพร่:
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 หรือเส้นทางไฟล์ คุณสามารถเพิ่มคอลัมน์เหล่านี้ใน exclude_table_columns ได้ที่ไฟล์ config
/*
* 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 สำหรับข้อมูลเพิ่มเติมเกี่ยวกับสิ่งที่เปลี่ยนแปลงไปเมื่อเร็ว ๆ นี้
โปรดดูรายละเอียดที่มีส่วนร่วม
โปรดดูรายละเอียดที่มีส่วนร่วม
โปรดตรวจสอบนโยบายความปลอดภัยของเราเกี่ยวกับวิธีการรายงานช่องโหว่ด้านความปลอดภัย
ใบอนุญาต MIT (MIT) โปรดดูไฟล์ใบอนุญาตสำหรับข้อมูลเพิ่มเติม