atan / opensearch
Aliyun Openearch for Laravel 5
1.0.2
2015-12-30 01:46 UTC
Requires
- php: >=5.4.0
- illuminate/support: 5.*
Requires (Dev)
- phpunit/phpunit: 4.*
- scrutinizer/ocular: ~1.1
This package is auto-updated.
Last update: 2024-10-12 06:45:15 UTC
README
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.