atan/opensearch
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.
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.0.2 | >=5.4.0 | 5.* | MIT | |
| 1.0.1 | >=5.4.0 | 5.0.*| | MIT | |
| 1.0.0 | >=5.4.0 | 5.0.*| | MIT |