8000 GitHub - tintnaingwin/kuu-pyaung at v2.0.1
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Laravel package to convert files and database from zawgyi to unicode.

License

Notifications You must be signed in to change notification settings

tintnaingwin/kuu-pyaung

Repository files navigation

Convert resources files and database from zawgyi to unicode for Laravel apps

Kuu Pyaung Package converts resources files and databases from zawgyi to Unicode.

If the context is Unicode, don't worry about the conflict context, Kuu Pyaung hasn't converted Unicode context to Unicode again.

Requirements

version-1.x

version-2.x

version-3.x

Laravel Version Compatibility

Laravel Package 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

Installation and usage

composer require tintnaingwin/kuu-pyaung

For laravel >=5.5 that's all. This package supports Laravel new Package Discovery.

If you are using Laravel < 5.5, you also need to add the service provider class to your project's config/app.php file:

Service Provider
Tintnaingwin\KuuPyaung\KuuPyaungServiceProvider::class,

You can publish the config-file with:

php artisan vendor:publish --provider="Tintnaingwin\KuuPyaung\KuuPyaungServiceProvider"

Artisan commands

You can convert your app by running:

php artisan kuupyaung:run

If you would like to convert only the files, run:

php artisan kuupyaung:run --only-files

If you would like to convert only the database, run:

php artisan kuupyaung:run --only-database

Configuration

Kuu Pyaung can be configured directly in /config/kuu-pyaung.php.

This is the contents of the published config file:

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',
    ],
];

Files Convert

This package convert only folder under the resource directories. You can determine which resource files will be convert.

    /*
     * These resource directories only will be convert.
     */
    'include_files' => [
        'views',
        'lang', // lang/my
    ],

Database Convert

This package convert only string data types from database. You can determine which tables will be excluded from the convert.

    /*
     * These database tables will be excluded from the convert.
     */
    'exclude_tables' => [
            'password_resets',
            'migrations',
            'failed_jobs',
            'telescope_entries',
            'telescope_entries_tags',
            'telescope_monitoring',
    ],

We highly recommend that you should use maintenance mode when you convert the database tables in production server.

Supported databases

  • MySQL
  • PostgreSQL
  • SQLite

Todo

  • Backup database
  • Restore database
  • Convert database with UI

Testing

Run the tests with:

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security-related issues, please email amigo.k8@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

0