Laravel 4.2和Cassandra

时间:2018-07-24 08:02:29

标签: cassandra laravel-4.2

如何将cassandra与laravel 4.2连接起来?

我已经从datastack安装了php-driver,并且可以在laravel框架之外使用它。

需要帮助。

1 个答案:

答案 0 :(得分:0)

Cassandra Laravel安装

•   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'