PHPackages                             simplecms/bank - 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. simplecms/bank

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

simplecms/bank
==============

 Laravel Bank Component / 银行大全

1.0.2(1y ago)010MITPHPPHP &gt;=8.0

Since Jul 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hackout/simplecms-bank)[ Packagist](https://packagist.org/packages/simplecms/bank)[ RSS](/packages/simplecms-bank/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Laravel Bank Component
======================

[](#laravel-bank-component)

📦 A comprehensive collection of information covering 260 banks as published by UnionPay.

English | [简体中文](./README_zhCN.md)

[![Latest Stable Version](https://camo.githubusercontent.com/a3ea96748d22cb6278c6d5a48b2f79e7af0c97e4f8530a14a7015cf3ca0d382a/68747470733a2f2f706f7365722e707567782e6f72672f73696d706c65636d732f62616e6b2f762f737461626c652e737667)](https://packagist.org/packages/simplecms/bank) [![Latest Unstable Version](https://camo.githubusercontent.com/cf31d3ee97203ee5b0937483e4c857451d8ec708e0b552a0200990c5e997bad7/68747470733a2f2f706f7365722e707567782e6f72672f73696d706c65636d732f62616e6b2f762f756e737461626c652e737667)](https://packagist.org/packages/simplecms/bank) [![Code Coverage](https://camo.githubusercontent.com/2ee8f0077642b1aa146386a539770cf2e2511f775b86b3c1122c447d4571565f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f766572747275652f656173792d736d732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hackout/simplecms-bank/?branch=master) [![Total Downloads](https://camo.githubusercontent.com/6cfa5fe47f21eff42a9463aee05b74372ad5b804e4d0c1b02c25990f4c2ff0ba/68747470733a2f2f706f7365722e707567782e6f72672f73696d706c65636d732f62616e6b2f646f776e6c6f616473)](https://packagist.org/packages/simplecms/bank) [![License](https://camo.githubusercontent.com/d725d1a08aef30acc787b451e5d72313be8c2a40c9b115770dd19f1f35cb10e4/68747470733a2f2f706f7365722e707567782e6f72672f73696d706c65636d732f62616e6b2f6c6963656e7365)](https://packagist.org/packages/simplecms/bank)

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

[](#requirements)

- PHP &gt;= 8.0
- [Laravel/Framework](https://packagist.org/packages/laravel/framework) &gt;= 9.0

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

[](#installation)

```
composer require simplecms/bank
```

Usage
-----

[](#usage)

Includes Validation Rule and safe\_bank\_number method.

### Get Bank List

[](#get-bank-list)

```
use SimpleCMS\Bank\Facades\Bank;

Bank::getBankList(); //Returns the complete list
Bank::getOptions(); // Returns as Collection
Bank::getOptions('DC'); // Returns a list of debit card banks. Supports all, DC, CC, SCC, PC
```

### Query and Check

[](#query-and-check)

```
use SimpleCMS\Bank\Facades\Bank;

Bank::getBankByCode($code); // Retrieve bank information by code
Bank::getBankByName($name); // Retrieve bank information by name
Bank::getBankByBin($bin); // Retrieve bank information by BIN
Bank::getBankByCardNumber($card_number); // Retrieve bank information by card number
Bank::checkBin($bin); // Check the validity of BIN
Bank::checkCardNumber($card_number); // Check the validity of card number
```

### Helpers

[](#helpers)

```
$card_number = '62270000000006666';
//Bank card masking
safe_bank_number((string) $card_number, (string) $maskChar = '*', (int) $start = 6, (int) $length = 4); // 622700********6666
```

### Validation

[](#validation)

```
$rules = [
    'bank' => 'bank', //Bank name
    'bank_bin' => 'bank_bin', //Bank BIN
    'bank_card' => 'bank_card', //Bank card number
    'bank_code' => 'bank_code' //Bank code
];
$messages = [
    'bank.bank' => 'The name of bank is incorrect.',
    'bank_bin.bank_bin' => 'The bin code is incorrect.',
    'bank_card.bank_card' => 'The card number is incorrect.',
    'bank_code.bank_code' => 'The code of bank is incorrect.',
];
$data = $request->validate($rules,$messages);
```

Custom Bank Data
----------------

[](#custom-bank-data)

You can customize your own data through the `.env` file.

### Modify Configuration File Path

[](#modify-configuration-file-path)

Add the following code to your `.env` file:

```
BANK_PATH='Your bank JSON file address' #Absolute location
```

### JSON Data Format

[](#json-data-format)

The data structure follows the format below:

```
{
    "name": "Bank Name",
    "code": "Bank code identifier",
    "bins": {
        "DC": {  # DC Debit Card
            "19": ["123456", "23456"] # 19 is the card number length, numeric content is the BIN code
        },
        "CC": {  # CC Credit Card
            "18": ["32131", "13123"]
        },
        "SCC": { # Semi-Credit Card
            "16": ["1233", "2345"],
            "17": ["3213", "3322"]
        },
        "PC": { # Prepaid Card
            "15": ["1234"]
        }
    }
}
```

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

2

Last Release

674d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e86728cb7944f155dc7c047658fe99f1aeaf605cd2f790dfa0d928540fe7f20f?d=identicon)[hackout](/maintainers/hackout)

---

Top Contributors

[![hackout](https://avatars.githubusercontent.com/u/9741288?v=4)](https://github.com/hackout "hackout (24 commits)")

---

Tags

laravelBankSimpleCMSchina bank list

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/simplecms-bank/health.svg)

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

###  Alternatives

[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[forxer/laravel-gravatar

A library providing easy gravatar integration in a Laravel project.

4235.6k](/packages/forxer-laravel-gravatar)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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