Skip to content

Configuration ​

Publish the config file (optional):

bash
php artisan vendor:publish --tag="laravel-myanmar-nrc-config"
php
return [
    'locale' => 'en',
    'json_file' => null,
    'db_driven' => true,
];
OptionDefaultDescription
localeenLanguage used when parsing: en or my. Only parse() reads it; isValid() and the validation rule ignore it
json_filenullNRC data file. null uses the bundled file. Use your own (e.g. storage_path('nrc.json')) and re-run php artisan mm-nrc:seed
db_driventrueValidate and parse against the database (true) or the JSON file (false). Can be overridden per call

A custom JSON file must contain a types array and a states array. Each state has a townships array. Every row has id, code, code_my, name and name_my.

Publish tags ​

TagPublishes
laravel-myanmar-nrc-configconfig/laravel-myanmar-nrc.php
laravel-myanmar-nrc-langlang/vendor/laravel-myanmar-nrc (validation messages in en and my)
laravel-myanmar-nrc-migrationsThe three NRC migrations into database/migrations, timestamped
laravel-myanmar-nrcAll of the above

Released under the MIT License, except where a package says otherwise.