Download the PHP package oguzhanbayirli/laravel-turkiye without Composer

On this page you can find all versions of the php package oguzhanbayirli/laravel-turkiye. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-turkiye

laravel-turkiye

Validation rules for Turkish identity numbers (TCKN), tax numbers (VKN) and IBANs, amounts written out in Turkish words for invoices, and a client for the daily exchange rates published by the Central Bank of the Republic of Türkiye (TCMB). Works with Laravel 12 on PHP 8.2+ and Laravel 13 on PHP 8.3+. Laravel 11 is left out because it no longer gets security fixes and Composer refuses to install it by default.

Türkçe README

Why another package

For years epigra/tckimlik was the usual way to check a TCKN in Laravel. It is archived now. According to the NVI notice quoted in its README, NVI's free public verification service (KPSPublic) was scheduled to close on 30 September 2025; checking a number against the population register now requires KPS membership. The offline check is still what most forms need, so this package does that, along with the other small Turkey-specific chores that keep coming up in invoicing code: VKN and IBAN checks, "Yalnız ... TL" lines and TCMB rates. Every part also works as a plain PHP class if you are not inside a Laravel request.

Installation

The service provider is discovered automatically. To change the TCMB settings or the validation messages, publish them:

Validation

Four rules are registered, each available as a string and as a rule object:

String Object Accepts
tckn Rules\Tckn 11-digit T.C. kimlik no
vkn Rules\Vkn 10-digit vergi kimlik no
tckn_or_vkn Rules\TcknOrVkn either of the above (invoice buyer field)
tr_iban Rules\TurkishIban TR IBAN, spaces, dashes and lower case okay

Messages ship in Turkish and English and follow the app locale:

If your own lang/{locale}/validation.php has a tckn, vkn, tckn_or_vkn or tr_iban line, that one wins.

Outside of the validator:

What these checks do not tell you

All three checks are offline arithmetic. A TCKN that passes has the right shape and check digits; it does not mean a person with that number exists, or that the name typed next to it matches. The same goes for VKN and IBAN: the account may be closed, or belong to someone else. When that matters, ask the bank or GİB.

Amounts in words

Numbers follow TDK spelling: "bin" never becomes "bir bin" and "yüz" never becomes "bir yüz". Plain text keeps the words apart; the invoice preset joins them, as TDK prescribes for amounts on commercial documents. Capitalisation follows common invoice practice, with the dotted capital İ.

Presets can be adjusted:

Without the facade: (new \OguzhanBayirli\Turkiye\Words\AmountInWords)->convert(...). NumberToWords::spell(1234) gives the bare number, "bin iki yüz otuz dört".

Some details:

TCMB exchange rates

Each Rate has forexBuying, forexSelling, banknoteBuying, banknoteSelling and crossRateUsd, all ?float. A price is null when the bulletin leaves it empty, which happens for SDR (XDR) banknote rates.

How it behaves:

Configuration, after publishing config/turkiye.php:

In your own tests, fake the HTTP client as usual:

These are TCMB's indicative rates. Which date and which of the four prices apply to a given invoice is a question for your accountant; the package only fetches them.

Testing

The test suite never touches the network. The TCMB tests replay real bulletins saved under tests/Fixtures.

Changelog

See CHANGELOG.md.

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.


All versions of laravel-turkiye with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-libxml Version *
ext-mbstring Version *
ext-simplexml Version *
illuminate/cache Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/translation Version ^12.0|^13.0
illuminate/validation Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package oguzhanbayirli/laravel-turkiye contains the following files

Loading the files please wait ...