jeudi 17 mars 2016

How to use Solarium with Laravel

I've included Solarium as required on composer.json, did 'composer install' and everything went fine.

However, when I try to create a client stance, I get an error:

Class 'Solarium\Client' not found

The code I'm using goes like this:

public function __construct()
{
    $config = array(
        'endpoint' => array(
            'localhost' => array(
                'host' => '127.0.0.1',
                'port' => 8983,
                'path' => '/solr/my_solr_instance',
                )
            )
        );

    $this->client = new \Solarium\Client($config);
}

Any ideas on how to fix this?



via Chebli Mohamed

1 commentaire: