2017 © Pedro Peláez
 

library laravel-cassandra

Cassandra wrapper for Laravel/Lumen

image

websmurf/laravel-cassandra

Cassandra wrapper for Laravel/Lumen

  • Friday, July 29, 2016
  • by websmurf
  • Repository
  • 3 Watchers
  • 7 Stars
  • 2,163 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

Laravel/Lumen wrapper for Cassandra

Build Status Scrutinizer Code Quality Code Coverage, (*1)

Installation

This packages uses the cassandra functionality provided by the Datastax php driver. It needs to be installed before you will be able to use this package. See for more information: http://datastax.github.io/php-driver/, (*2)

Install using composer:, (*3)

composer require websmurf/laravel-cassandra

After that, register the service provider by adding it in your app.php:, (*4)

$app->register(Websmurf\LaravelCassandra\CassandraServiceProvider::class);

You can publish the configuration using the following command:, (*5)

php artisan config:publish websmurf/laravel-cassandra

Or simply create a copy of the config/cassandra.php file in your app/config folder., (*6)

After that, change the configuration according to your needs., (*7)

Usage

After installation, you can inject Cassandra in your constructor and use it in your code:, (*8)

// Inject in the constructor
public function __construct(Cassandra $cassandra, Request $request)
{
    $this->cassandra = $cassandra;
}

// Create prepared statement
$prepared = $this->cassandra->prepare('THIS IS MY CQL STATEMENT');

// Create options for execution
$options = new \Cassandra\ExecutionOptions([
    'arguments' => $data,
    'consistency' => \Cassandra::CONSISTENCY_ONE
]);

// Execute statement
$this->cassandra->execute($prepared, $options);

The Versions

29/07 2016

dev-master

9999999-dev https://github.com/websmurf/laravel-cassandra

Cassandra wrapper for Laravel/Lumen

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adam van Dongen

cassandra

29/07 2016

v0.4.0

0.4.0.0 https://github.com/websmurf/laravel-cassandra

Cassandra wrapper for Laravel/Lumen

  Sources   Download

MIT

The Requires

 

The Development Requires

by Adam van Dongen

cassandra

28/07 2016

v0.3.0

0.3.0.0 https://github.com/websmurf/laravel-cassandra

Cassandra wrapper for Laravel/Lumen

  Sources   Download

MIT

The Requires

 

by Adam van Dongen

cassandra

28/07 2016

v0.2.0

0.2.0.0 https://github.com/websmurf/laravel-cassandra

Cassandra wrapper for Laravel/Lumen

  Sources   Download

MIT

The Requires

 

by Adam van Dongen

cassandra

27/07 2016

v0.1.0

0.1.0.0 https://github.com/websmurf/laravel-cassandra

Cassandra wrapper for Laravel/Lumen

  Sources   Download

MIT

The Requires

 

by Adam van Dongen

cassandra