byhaskell/novaposhta-bundle
最新稳定版本:v0.2.2
Composer 安装命令:
composer require byhaskell/novaposhta-bundle
包简介
Nova Poshta integration bundle for Symfony
README 文档
README
About
Nova Poshta integration bundle for Symfony (6, 7)
Created by @byhaskell
#StandWithUkraine 🇺🇦
What's this?
This library can be used for easy interaction with Nova Poshta.
Installation Symfony Flex
composer require byhaskell/novaposhta-bundle
Installation without Symfony Flex
$bundles = array( // ... other bundles new byhaskell\NovaPoshtaBundle\ByhaskellNovaPoshtaBundle(), );
Configuration
Create new file: config/packages/byhaskell_nova_poshta.yaml
byhaskell_nova_poshta: # You can create one on the Nova Poshta website at: # https://new.novaposhta.ua/dashboard/settings/developers api_key: '%env(NP_API_KEY)%' base_url: 'https://api.novaposhta.ua/v2.0/json/'
Add NP_API_KEY in .env
Usage
public function index(\byhaskell\NovaPoshtaBundle\NovaPoshta $novaPoshta): JsonResponse { $response = $novaPoshta->address()->searchSettlements('Київ'); if ($response->isSuccess()) { /** @var AddressResponse $result */ $result = $response->getResult(); } else { // Errors // $response->getInfo(); // $response->getErrors(); // $response->getWarnings(); } }
Copyright / License
See LICENSE
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-13