Download the PHP package akukoder/mykad without Composer

On this page you can find all versions of the php package akukoder/mykad. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mykad

MyKad

Extract information from MyKad/MyKid number, validate the input from user and generate Faker data.

About MyKad

The Government Multi-Purpose Smart Card Project (MPSC) or MyKad is part of the Multimedia Super Corridor (MSC Malaysia) initiative.

Introduction

This package provides:

  1. Data extraction
  2. Input validation
  3. Faker Provider to generate fake MyKad number (for Laravel)

Installation

You can install the package via composer:

Data Extraction

With this package, your can extract some information from the MyKad/MyKid:

  1. Date of Birth
  2. State name
  3. Gender

Date of birth

Get date of birth from the input.

Gender

Get gender from the input. Basically, 1 for male and 0 for female.

State

Get state name from the input.

Validation

One of the most annoying thing when dealing with user records is when they entered wrong MyKad/MyKid number. This package helps reduce the burden to deal with invalid input by users.

This package will validate MyKad/MyKid number to make sure:

Note:

Any other unnecessary characters from the input will be removed, including dashes.

Usage

Get exception on errors

Faker Provider

To generate dummy data for your test or model factory, add these to on of your service provider or create new one. Let's create a new service provider:

Register MyKadProvider in register method.

Make sure to include the additional Laravel service provider in the file.

Now you can use the new formatter like the other Faker formatters. In a Laravel factory, the syntax for the custom formatter looks like this:

Testing

Credits

  1. https://www.jpn.gov.my/en/faq/faq-identity-card
  2. https://hofmannsven.com/2021/faker-provider-in-laravel

License

The MIT License (MIT).


All versions of mykad with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0|^8.1
nesbot/carbon Version ^2.53.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package akukoder/mykad contains the following files

Loading the files please wait ....