tanshiqi / opensearch by atan

Aliyun Openearch for Laravel 5
128
3
2
Package Data
Maintainer Username: atan
Maintainer Contact: tanshiqi@gmail.com (atan)
Package Create Date: 2015-11-13
Package Last Update: 2015-12-30
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-05-03 03:16:09
Package Statistics
Total Downloads: 128
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 3
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Aliyun Opensearch

Aliyun Opeansearch for Laravel 5

Install

Via Composer

$ composer require atan/opensearch

As with most Laravel 5 packages you'll then need to register the Opensearch service provider. To do that, head over your config/app.php file and add the following line into the providers array:

Atan\Opensearch\OpensearchServiceProvider::class,

Add the BootForm facade to the aliases array in config/app.php:

'Opensearch' => Atan\Opensearch\Facades\Opensearch::class,

Configuration

Publish all vendor assets

php artisan vendor:publish

Usage

$opensearch = Opensearch::connect();
$opensearch->setQueryString("default:'关键词'");
$opensearch->setFormat('json');

$result = $opensearch->search();

License

The MIT License (MIT). Please see License File for more information.