limenet/laravel-elastica-bridge
最新稳定版本:v2.0.0
Composer 安装命令:
composer require limenet/laravel-elastica-bridge
包简介
A simple bridge between Laravel and Elasticsearch using Elastica
README 文档
README
A simple bridge between Laravel and Elasticsearch using Elastica, based on https://github.com/valantic/pimcore-elastica-bridge.
Requirements
- PHP 8.1+
- Laravel 10.0
- Job Batching is setup
Installation
You can install the package via composer:
composer require limenet/laravel-elastica-bridge
You can publish and run the migrations with:
php artisan vendor:publish --provider="Limenet\LaravelElasticaBridge\LaravelElasticaBridgeServiceProvider" --tag="elastica-bridge-migrations" php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="Limenet\LaravelElasticaBridge\LaravelElasticaBridgeServiceProvider" --tag="elastica-bridge-config"
This is the contents of the published config file:
return [ 'elasticsearch' => [ 'host' => env('ELASTICSEARCH_HOST', 'localhost'), 'port' => env('ELASTICSEARCH_PORT', '9200'), ], 'indices' => [], 'events' => [ 'listen' => true, ], ];
Usage
- Add
Limenet\LaravelElasticaBridge\Model\ElasticsearchableInterfaceandLimenet\LaravelElasticaBridge\Model\ElasticsearchableTraitto a model - Create a class extending
Limenet\LaravelElasticaBridge\Index\AbstractIndex - Add the index to your config (
elastica-bridge.indices) - Run
php artisan elastica-bridge:index - Check using
php artisan elastica-bridge:status
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 323
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-08