PHPackages                             masoudjahromi/laravel-cassandra - 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. [Database &amp; ORM](/categories/database)
4. /
5. masoudjahromi/laravel-cassandra

ActiveLibrary[Database &amp; ORM](/categories/database)

masoudjahromi/laravel-cassandra
===============================

Cassandra client library for Laravel. Integrate Cassandra into your Laravel app.

85702[1 issues](https://github.com/masoudjahromi/Laravel-Cassandra/issues)PHP

Since Apr 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/masoudjahromi/Laravel-Cassandra)[ Packagist](https://packagist.org/packages/masoudjahromi/laravel-cassandra)[ RSS](/packages/masoudjahromi-laravel-cassandra/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Cassandra client library for Laravel. Integrate Cassandra into your Laravel app. Inspired by [duoshuo/php-cassandra](https://github.com/duoshuo/php-cassandra). Enjoy it!

Table of contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Fetch Data](#fetch-data)
- [Query Asynchronously](#query-asynchronously)
- [Using preparation and data binding](#using-preparation-and-data-binding)
- [Using Batch](#using-batch)
- [Supported datatypes](#supported-datatypes)
- [Using nested datatypes](#using-nested-datatypes)
- [Inspired by](#inspired-by)

Features
--------

[](#features)

- Using Protocol v3 (Cassandra 2.1)
- Support ssl/tls with stream transport layer
- Support asynchronous and synchronous request
- Support for logged, unlogged and counter batches
- The ability to specify the consistency, "serial consistency" and all flags defined in the protocol
- Support Query preparation and execute
- Support all data types conversion and binding, including collection types, tuple and UDT
- Support conditional update/insert
- 5 fetch methods (fetchAll, fetchRow, fetchPairs, fetchCol, fetchOne)
- Two transport layers - socket and stream.
- Using exceptions to report errors
- 800% performance improvement(async mode) than other php cassandra client libraries

Installation
------------

[](#installation)

PHP 5.4+ is required.

**Installation using composer:**

```
composer require masoudjahromi/laravel-cassandra "dev-master"

```

OR

**Append dependency into composer.json**

```
	...
	"require": {
		...
		"masoudjahromi/laravel-cassandra": "dev-master"
	}
	...

```

Then run following command:

```
composer update

```

Add Cassandra service provider in `config/app.php`:

```
Masoudjahromi\LaravelCassandra\CassandraServiceProvider::class,
```

Basic Usage
-----------

[](#basic-usage)

```
