PHPackages                             stboris/laravel-croatia-toolkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. stboris/laravel-croatia-toolkit

ActiveLibrary

stboris/laravel-croatia-toolkit
===============================

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.

v1.1.1(yesterday)00MITPHP ^8.3

Since Jul 22Compare

[ Source](https://github.com/stboris/laravel-croatia-toolkit)[ Packagist](https://packagist.org/packages/stboris/laravel-croatia-toolkit)[ RSS](/packages/stboris-laravel-croatia-toolkit/feed)WikiDiscussions Synced today

READMEChangelogDependencies (7)Versions (4)Used By (0)

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
------------

[](#installation)

```
composer require stboris/laravel-croatia-toolkit
php artisan vendor:publish --tag="croatia-toolkit-config"
```

OIB
---

[](#oib)

Checksum validation (ISO 7064 MOD 11,10) needs no configuration or network access:

```
use Stboris\LaravelCroatiaToolkit\Oib\Oib;

Oib::isValid('69435151530'); // true
```

As a validation rule:

```
use Stboris\LaravelCroatiaToolkit\Oib\Rules\ValidOib;

$request->validate([
    'oib' => ['required', new ValidOib],
]);
```

### Company lookup (Sudski registar)

[](#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:
- Production:

```
CROATIA_TOOLKIT_SUDREG_CLIENT_ID=
CROATIA_TOOLKIT_SUDREG_CLIENT_SECRET=
```

```
use Stboris\LaravelCroatiaToolkit\Oib\SudskiRegistarClient;

$company = app(SudskiRegistarClient::class)->lookup('69435151530');

$company->name;
$company->address;
$company->active;
```

> Verified live against the test environment (2026-07-22): token auth is HTTP Basic (client id/secret), the lookup endpoint is `/api/javni/detalji_subjekta` with `tip_identifikatora`/`identifikator`query params, and a not-found subject comes back as an empty JSON object rather than a 404.

### Filament form field

[](#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:

```
use Filament\Schemas\Components\Utilities\Get;
use Filament\Forms\Components\TextInput;
use Stboris\LaravelCroatiaToolkit\Oib\Filament\OibField;

OibField::make('oib')
    ->autofill(name: 'company_name', address: 'address'),

TextInput::make('company_name')
    ->disabled(fn (Get $get) => $get('oib_locked')),

TextInput::make('address')
    ->disabled(fn (Get $get) => $get('oib_locked')),
```

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
------------------

[](#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).

```
use Stboris\LaravelCroatiaToolkit\Hnb\ExchangeRateClient;

$client = new ExchangeRateClient;

$client->rate('USD');           // today's USD rate, or null
$client->rate('USD', '2026-01-15'); // a specific date
$client->list();                // every currency for today
```

IBAN
----

[](#iban)

Generic ISO 13616 (MOD-97-10) checksum for any country, plus a Croatia-specific shape check:

```
use Stboris\LaravelCroatiaToolkit\Iban\Iban;

Iban::isValid('HR1523600001234567891');          // true - any valid IBAN
Iban::isValidCroatian('HR1523600001234567891');  // true - Croatian shape + checksum
```

As a validation rule:

```
use Stboris\LaravelCroatiaToolkit\Iban\Rules\ValidIban;

$request->validate([
    'iban' => ['required', new ValidIban(croatianOnly: true)],
]);
```

Translations
------------

[](#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:

```
app()->setLocale('hr');
// "Polje oib nije ispravan OIB."
```

To customize the wording, publish and edit the files:

```
php artisan vendor:publish --tag="croatia-toolkit-translations"
```

which places them under `lang/vendor/croatia-toolkit/{locale}/validation.php`.

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3891cb1553b2a3e264c172a8ab016291be67c863bd191010a6ba7294517b8fe4?d=identicon)[stboris](/maintainers/stboris)

---

Tags

laravelfilamentIBANcroatiaoibhnbsudski-registar

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/stboris-laravel-croatia-toolkit/health.svg)

```
[![Health](https://phpackages.com/badges/stboris-laravel-croatia-toolkit/health.svg)](https://phpackages.com/packages/stboris-laravel-croatia-toolkit)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M184](/packages/laravel-mcp)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
