Download the PHP package stboris/laravel-croatia-toolkit without Composer
On this page you can find all versions of the php package stboris/laravel-croatia-toolkit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stboris/laravel-croatia-toolkit
More information about stboris/laravel-croatia-toolkit
Files in stboris/laravel-croatia-toolkit
Package laravel-croatia-toolkit
Short Description Croatian business utilities for Laravel: OIB validation and Sudski registar company lookup, HNB exchange rates, and Croatian IBAN validation — with an optional Filament form field.
License MIT
Informations about the package laravel-croatia-toolkit
Laravel Croatia Toolkit
Small, focused Croatian business utilities for Laravel: OIB validation and Sudski registar (court register) company lookup, HNB exchange rates, and Croatian IBAN validation - with an optional Filament v5 form field for OIB autofill.
Free and MIT-licensed. No Croatian company registration is required to use or test any of it.
Installation
OIB
Checksum validation (ISO 7064 MOD 11,10) needs no configuration or network access:
As a validation rule:
Company lookup (Sudski registar)
Looking up a company's name/address by OIB additionally needs a free client id/secret from the Sudski registar open data portal - no company registration required, just a valid email:
- Test: https://sudreg-data-test.gov.hr
- Production: https://sudreg-data.gov.hr
Verified live against the test environment (2026-07-22): token auth is HTTP Basic (client id/secret), the lookup endpoint is
/api/javni/detalji_subjektawithtip_identifikatora/identifikatorquery params, and a not-found subject comes back as an empty JSON object rather than a 404.
Filament form field
Requires filament/filament. Validates the OIB as you type and, once
valid, autofills sibling fields from the Sudski registar. A magnifying-glass
icon signals the lookup, turning into a checkmark on success or a warning
triangle on failure, with a translated helper text explaining the behaviour:
A successful lookup sets a {name}_locked state flag (oib_locked for a
field named oib) - bind sibling fields' ->disabled() to it if you don't
want autofilled registry data overwritten by hand.
HNB exchange rates
Public, keyless API - no configuration needed. Uses the live
api.hnb.hr/tecajn-eur/v3 endpoint (the older /tecajn/v2 path stopped
updating when Croatia adopted the euro in 2023).
IBAN
Generic ISO 13616 (MOD-97-10) checksum for any country, plus a Croatia-specific shape check:
As a validation rule:
Translations
Validation messages are translated for English (default) and Croatian -
whichever the app's locale (app()->getLocale()) resolves to is used
automatically, no setup needed:
To customize the wording, publish and edit the files:
which places them under lang/vendor/croatia-toolkit/{locale}/validation.php.
Testing
License
MIT.
All versions of laravel-croatia-toolkit with dependencies
illuminate/contracts Version ^13.0
illuminate/http Version ^13.0
illuminate/support Version ^13.0
spatie/laravel-package-tools Version ^1.16