laranex/laravel-myanmar-nrc

A Laravel package to deal with NRC from Myanmar

v2.0.0 2024-08-28 06:57 UTC

This package is auto-updated.

Last update: 2024-11-28 07:29:21 UTC


README

Latest Version on Packagist Total Downloads

A Laravel package to deal with NRC from Myanmar.

Installation

You can install the package via composer:

composer require Laranex/laravel-myanmar-nrc

#This will create required tables for handing NRC from Myanmar
php artisan migrate

#This will read the nrc data from predefined json file and insert into database
php artisan mm-nrc:seed

Configuration

php artisan vendor:publish --tag="laravel-myanmar-nrc"

Supported Functions

  • Validation of NRC
  • Full set of predefined NRC List (You can replace or override with yours)
  • Multiple language for NRC (Myanmar, English)

NOTE

  • This package use ID based network communication to secure the NRC data & enhance the Validation, Parsing.

  • example format of NRC data from a network request

    • X-X-X-12345
    • Where the very fist X represents the ID of the STATE in database/json, the second X is for TOWNSHIP and the last is for TYPE of the NRC.

Usage

    //Validation
    new \Laranex\LaravelMyanmarNRC\Rules\MyanmarNRC()
    
    //Parsing the NRC from network
    \Laranex\LaravelMyanmarNRC\LaravelMyanmarNrcFacade::parseNRC($nrc, $dbDriven, $lang)
        (OR)
    \Laranex\LaravelMyanmarNRC\LaravelMyanmarNrc::parseNRC($nrc, $dbDriven, $lang)
    
    
    //$nrc represents the nrc (X-X-X-12345) from network,
    //$drDriven defines if the application use database or predefined json file to parse, validate the nrc and,
    //$lang is for the Languages (mm and en are supported) to be used in parsing.

    //default values for $dbDriven & $lang will be read from config file if you do not pass the values to the method.

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

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

License

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