Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Novaposhta Bundle Laravel Package

byhaskell/novaposhta-bundle

View on GitHub
Deep Wiki
Context7

Symfony NovaPoshta Bundle

License Latest Stable Version Total Downloads

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

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style