dipta995/laravel-codicefiscale
最新稳定版本:1.5.0
Composer 安装命令:
composer require dipta995/laravel-codicefiscale
包简介
A Laravel package for codice fiscale functionalities
README 文档
README
Here's a short and concise version for installation and usage with an example:
Laravel Codice Fiscale
A Laravel package to handle codice fiscale operations with secure JSON data.
🚀 Installation
composer require dipta995/laravel-codicefiscale
If auto-discovery doesn't work, register manually in config/app.php:
'providers' => [ Dipta995\LaravelCodiceFiscale\LaravelCodiceFiscaleServiceProvider::class, ], 'aliases' => [ 'CodiceFiscale' => Dipta995\LaravelCodiceFiscale\Facades\CodiceFiscale::class, ];
Run:
composer dump-autoload php artisan config:clear
📦 Usage
1️⃣ Fetch JSON Data in Controller
Example For ROME:
{
"surname": "Rossi",
"name": "Mario",
"dob": "1985-07-15",
"gender": "M",
"placeCode": "H501"
}
use CodiceFiscale; //Check Validation CodiceFiscale::validateFiscalCode($jsonData); //Fetch All states $jsonData = CodiceFiscale::getJsonData(); //Generate Fiscal Code with State validation or without validation // using true as 6th param that is not mandatory CodiceFiscale::generateCodiceFiscale($surname, $name, $dob, $gender, $placeCode,true);
2️⃣ Display JSON Data in Blade
@foreach ($jsonData as $key => $value) <p>{{ $key }}: {{ is_array($value) ? implode(', ', $value) : $value }}</p> @endforeach
✅ Done!
Your package is ready to use.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-04