PHPackages                             lalusahibul/fakenik - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lalusahibul/fakenik

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lalusahibul/fakenik
===================

Generator NIK untuk data dummy di Laravel

v1.0.3(1y ago)04MITPHPPHP ^8.0

Since Jun 2Pushed 1y agoCompare

[ Source](https://github.com/lalusahibul/fakenik)[ Packagist](https://packagist.org/packages/lalusahibul/fakenik)[ RSS](/packages/lalusahibul-fakenik/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (5)Used By (0)

FakeNIK Laravel
===============

[](#fakenik-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/a3dad4a05da709e2ab019b2d1f2d1a4941467f657e73b6d3fee84f6d7e36d8d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c616c757361686962756c2f66616b656e696b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lalusahibul/fakenik)[![Total Downloads](https://camo.githubusercontent.com/7133834f1439c7311fe620f1742e379f8efac3567f5f3e6ab60af8c6f5b75c20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c616c757361686962756c2f66616b656e696b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lalusahibul/fakenik)[![License](https://camo.githubusercontent.com/3863ee8453f4363862b2319252073ba6abfb991d2fe9e09a5de1be3d6c69a832/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c616c757361686962756c2f66616b656e696b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lalusahibul/fakenik)

FakeNIK is a Laravel library that generates random Indonesian National Identity Numbers (NIK). This library is very useful for dummy data purposes during application development or testing.

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Examples](#examples)
- [License](#license)

Requirements
------------

[](#requirements)

- PHP ^8.0
- Laravel ^9.0|^10.0|^11.0 (or the versions you support in your `composer.json`)

Installation
------------

[](#installation)

You can install this package via Composer. Run the following command in your terminal:

```
composer require lalusahibul/fakenik
```

Configuration
-------------

[](#configuration)

The package works out-of-the-box with sensible defaults. However, if you wish to customize these default values, you can easily publish the configuration file.

This allows you to change the default region codes (province, regency, district) and the default birth year range used when generating a NIK.

To publish the configuration file, run the following Artisan command in your terminal:

```
php artisan vendor:publish --tag=lalusahibul-fakenik
```

After that you can change default value in folder config/fakenik.php

```
//config/fakenik.php
'default_code' => [
        'province' => '52', // Example: Nusa Tenggara Barat
        'regency'  => '05', // Example: Kabupaten Dompu
        'district' => '06', // Example: Kecamatan Pekat
    ],
    'birth_year_range' => [
        'min' => 1970,
        'max' => 2010,
    ],
```

Usage
-----

[](#usage)

To get started, add the following `use` statements to your PHP file:

```
use Fakenik\Generator;
use Fakenik\DateOfBirth;
```

Examples
--------

[](#examples)

```
use Illuminate\Support\Facades\Route;
use Fakenik\Generator;
use Fakenik\DateOfBirth;

Route::get('/example', function () {
    // Generate a complete NIK using default settings.
    // The birth year range and default region codes are pulled from the `fakenik.php` config file.
    // To customize these values, you can publish the configuration file.
    $tahunLahir = DateOfBirth::generateBirthYear();
    $bulanLahir = DateOfBirth::generateBirthMonth();
    $tanggalLahir = DateOfBirth::generateBirthDay($bulanLahir, $tahunLahir);
    $nik = Generator::generate($tanggalLahir, $bulanLahir, $tahunLahir);
    return response()->json([
        'nik_tergenerate' => $nik,
        'detail_tanggal_lahir' => [
            'tanggal' => $tanggalLahir,
            'bulan' => $bulanLahir,
            'tahun' => $tahunLahir,
        ]
    ]);
```

License
-------

[](#license)

[**License**](LICENSE.md)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance47

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

392d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a075775b27b7cee6de0e4548ac8ba1403bac1e926c5ded073fbaa7d639c5909?d=identicon)[ibul](/maintainers/ibul)

---

Top Contributors

[![lalusahibul](https://avatars.githubusercontent.com/u/74950799?v=4)](https://github.com/lalusahibul "lalusahibul (6 commits)")

---

Tags

laravelgeneratornikacak

### Embed Badge

![Health badge](/badges/lalusahibul-fakenik/health.svg)

```
[![Health](https://phpackages.com/badges/lalusahibul-fakenik/health.svg)](https://phpackages.com/packages/lalusahibul-fakenik)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[akira/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

494.8k](/packages/akira-laravel-qrcode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
