Download the PHP package zvermafia/transliteration-laravel without Composer
On this page you can find all versions of the php package zvermafia/transliteration-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zvermafia/transliteration-laravel
More information about zvermafia/transliteration-laravel
Files in zvermafia/transliteration-laravel
Package transliteration-laravel
Short Description Integration of the zvermafia/transliteration with Laravel
License MIT
Homepage https://github.com/zvermafia/transliteration-laravel
Informations about the package transliteration-laravel
Uzbek transliterator for Laravel
Integration of the zvermafia/transliteration with Laravel.
Navigation by sections
- Install
- Setup
- Usage
- Change log
- Contributing
- Security
- Credits
- License
Install
Via Composer
Setup
There are two options for your choice, alif
and lotin
. With the option alif
will be used the alif.uz's API. And with the option lotin
will be used the lotin.uz's API.
Default option is alif
. But if you want to change this to the lotin
option then you simply need to add a TRANSLITERATOR
key with the value lotin
into the .env file.
But if you want to extend this package with your own realization then you need to publish package's configuration file and update it with your option.
To publish the configuration file simply execute the php artisan vendor:publish
command in the project root folder and select the Zvermafia\TransliterationLaravel\TransliteratorServiceProvider
as a provider.
Usage
You can use a LaraTransliterator
facade but I'll show you another way in the example below.
Let's assume we have a PoorWorkerController with a translit method in which we want transliterate a requested text (with POST method) and return the result as JSON.
For AJAX requests you can use a ready-made controller! Firstly you must define a route for the controller:
For AJAX request demonstration we'll use jQuery library:
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Mokhirjon Naimov
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of transliteration-laravel with dependencies
laravel/framework Version ^5.6 || ^6.0 || ^7.0
zvermafia/transliteration Version ~0.1