chocofamilyme / laravel-tarantool
A Tarantool based Eloquent ORM and Query builder for Laravel
Installs: 2 253
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 6
Forks: 13
Open Issues: 2
Requires
- php: ^7.3|^8.0
- illuminate/container: ^8.0
- illuminate/database: ^8.0
- illuminate/events: ^8.0
- illuminate/support: ^8.0
- rybakit/msgpack: ^0.7
- tarantool/client: ^0.9.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- vimeo/psalm: ^4.1.0
This package is auto-updated.
Last update: 2024-11-06 11:42:04 UTC
README
This package adds functionalities to the Eloquent model and Query builder for Tarantool, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods.
Installation
Laravel Version Compatibility
Via Composer
composer require chocofamilyme/laravel-tarantool
Configuration
You can use Tarantool either as the main database, either as a side database. To do so, add a new tarantool
connection to config/database.php
:
'tarantool' => [ 'driver' => 'tarantool', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', 3301), 'database' => env('DB_DATABASE'), 'username' => env('DB_USERNAME'), 'password' => env('DB_PASSWORD'), 'driver_oprions' => [ 'connection_type' => env('DB_CONNECTION_TYPE', 'tcp') ], 'options' => [ 'connect_timeout' => 5, 'max_retries' => 3 ] ],
Set tarantool as main database
'default' => env('DB_CONNECTION', 'tarantool'),
You can also configure connection with dsn string:
'tarantool' => [ 'driver' => 'tarantool', 'dsn' => env('DB_DSN'), 'database' => env('DB_DATABASE'), ],