定制 davispeixoto/laravel-4-solr 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

davispeixoto/laravel-4-solr

Composer 安装命令:

composer require davispeixoto/laravel-4-solr

包简介

Laravel 4 Apache Solr simple query client

README 文档

README

Build Status

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

Installation

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.

'Davispeixoto\Laravel4Solr\Laravel4SolrServiceProvider'

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

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

License

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

Versioning

This project follows the Semantic Versioning

统计信息

  • 总下载量: 103
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固