emadshirzad / iranian-bank-list-laravel
list all banks into laravel
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 1
Open Issues: 0
pkg:composer/emadshirzad/iranian-bank-list-laravel
Requires
- php: >=8.3
- illuminate/support: ^12.0
This package is not auto-updated.
Last update: 2025-12-30 01:53:17 UTC
README
A comprehensive Laravel package for Iranian banking operations including bank identification, IBAN validation, and card number verification.
Features
- Complete list of Iranian banks with details
- IBAN validation using mod-97 algorithm
- Iranian card number validation using Luhn algorithm
- Bank identification by IBAN, card number, or name
- FilamentPHP integration support
- Easy-to-use facade and model interfaces
Installation
-
Install the package via Composer:
composer require emadshirzad/iranian-bank-list-laravel
-
Publish the configuration file:
php artisan vendor:publish --tag=iranian-bank-config
-
Run the migration to create the banks table:
php artisan migrate
-
Seed the database with bank data:
php artisan db:seed --class=IranianBankSeeder
Usage
Getting All Banks
use EmadShirzad\IranianBank\Facades\IranianBank; // Using facade $banks = IranianBank::getBanks(); // Or using model directly use App\Models\IranianBank; $banks = IranianBank::all();
Bank Identification
Get bank details by IBAN:
use EmadShirzad\IranianBank\Facades\IranianBank; $bank = IranianBank::getBankByIban('IR123456789012345678901234567890'); // Returns bank details or null if not found
Get bank details by card number:
use EmadShirzad\IranianBank\Facades\IranianBank; $bank = IranianBank::getBankByCardNumber('6037991234567890'); // Returns bank details or null if not found
Find bank by name:
use EmadShirzad\IranianBank\Facades\IranianBank; $bank = IranianBank::findByName('melli'); // Returns bank details or null if not found
Advanced Search Methods
Find bank by full card number using regex:
use EmadShirzad\IranianBank\Facades\IranianBank; $bank = IranianBank::findByCardNumber('6037991234567890'); // Returns bank details or null if not found
Find bank by full IBAN using regex:
use EmadShirzad\IranianBank\Facades\IranianBank; $bank = IranianBank::findByIban('IR123456789012345678901234567890'); // Returns bank details or null if not found
Validation Methods
Validate IBAN:
use EmadShirzad\IranianBank\Facades\IranianBank; $isValid = IranianBank::validateIban('IR123456789012345678901234567890'); // Returns true or false
Validate Iranian card number using Luhn algorithm:
use EmadShirzad\IranianBank\Facades\IranianBank; $isValid = IranianBank::validateIranianCard('6037991234567890'); // Returns true or false
Validate IBAN checksum using mod-97 algorithm:
use EmadShirzad\IranianBank\Facades\IranianBank; $isValid = IranianBank::validateChecksum('IR123456789012345678901234567890'); // Returns true or false
FilamentPHP Integration
If you're using FilamentPHP, you can easily create an admin interface for the bank data:
-
Create a Filament resource:
php artisan make:filament-resource IranianBank
-
Update the resource file at
app/Filament/Resources/IranianBankResource.phpusing the package methods. -
Example implementation can be found in the FilamentResource example file.
The FilamentPHP integration provides a clean admin interface for managing Iranian bank data:
Documentation
For detailed FilamentPHP usage, refer to the official FilamentPHP documentation.
Requirements
- PHP >= 8.0
- Laravel >= 9.0
License
This package is open-sourced software licensed under the MIT License.
Contributing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Support
If you encounter any issues or have questions, please open an issue on GitHub.
Author
Made with ❤️ for the Laravel community
