Search code examples
cassandralaravel-4.2

Laravel 4.2 and Cassandra


How can i connect cassandra with laravel 4.2 ?

I already install php-driver from datastack and I can use it outside the laravel framework.

Need help.


Solution

  • Cassandra Laravel Installation

    •   Install DataStax PHP Driver for Apache Cassandra on the server
      See https://github.com/datastax/php-driver
      pecl install cassandra
      This command will add cassandra extension in our php. Check cassandra extension using phpinfo();
      Restart php after installing the extension.
    
    
      Common issue:
      https://stackoverflow.com/questions/39348265/cassandra-php-driver-on-macos-class-cassandra-simplestatement-not-found
    
    •   Install laravel cassandra eloquent wrapper and query builder
      See https://github.com/cubettech/lacassa
      See http://cubettech.com/laravel-cassandra/
    
      Add config for database. \config\database.php
      Add new providers in app. \config\app.php => 'Cubettech\Lacassa\CassandraServiceProvider'