Laravel package for validating and retrieving Greek AFM information using the AADE public web service.
- Validate AFM numbers
- Check if AFM exists in AADE
- Retrieve business information
- Laravel Facade support
- Laravel auto-discovery
Install the package via Composer:
composer require nextpointer/aadePublish the config file:
php artisan vendor:publish --tag=aade-configAdd your AADE credentials to .env:
AADE_USERNAME=your_username
AADE_PASSWORD=your_password
AADE_CALLED_BY=123456789
Explanation:
| Variable | Description |
|---|---|
| AADE_USERNAME | Username provided by AADE |
| AADE_PASSWORD | Password provided by AADE |
| AADE_CALLED_BY | The AFM of the account calling the AADE service |
Import the facade:
use Aade;Check if an AFM is mathematically valid.
Aade::isValid('094259216');Returns:
true | false
Aade::exists('094259216');Returns:
true | false
$data = Aade::info('094259216');Example response:
[
"success" => true,
"raw" => "...AADE XML response..."
]use Aade;
if (Aade::isValid($afm)) {
if (Aade::exists($afm)) {
$data = Aade::info($afm);
}
}- PHP 8.2+
- Laravel 10 / 11 / 12
- AADE web service credentials
MIT License