This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Laravel 4 Apache Solr simple query client

0.0.3 2014-05-14 20:47 UTC

This package is auto-updated.

Last update: 2021-07-23 21:10:12 UTC


Build Status

This Laravel 4 package provides an interface for consuming (querying) Apache Solr via its restful interface.


Begin by installing this package through Composer. Edit your project's composer.json file to require davispeixoto/laravel-4-solr.

"require": {
	"laravel/framework": "4.1.*",
	"davispeixoto/laravel-4-solr": "dev-master"

Next, update Composer from the Terminal:

composer update

Once this operation completes, still in Terminal run:

php artisan config:publish davispeixoto/laravel-4-solr

Update the settings in the generated app/config/packages/davispeixoto/laravel-4-solr configuration file with solr endpoint, port, output format.

Finally add the service provider. Open app/config/app.php, and add a new item to the providers array.


That's it! You're all set to go. Just use:

Route::get('/test', function() {
	try {
    	Solr::setFQ('color' , 'blue*');
    	$results = Solr::getResults();
    	echo print_r($results , true);
	} catch (Exception $e) {
		die($e->getMessage() . $e->getTraceAsString());


This library is open-sourced software licensed under the MIT license


This project follows the Semantic Versioning