Download the PHP package carropublic/herosearch without Composer
On this page you can find all versions of the php package carropublic/herosearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carropublic/herosearch
More information about carropublic/herosearch
Files in carropublic/herosearch
Package herosearch
Short Description Laravel scout with elastic search driver
License MIT
Homepage https://github.com/carropublic/herosearch
Informations about the package herosearch
HeroSearch
Laravel Scout elasticsearch driver base on our own needs.
What's hero-search?
Before Carro, it was car hero. Base on that, we named our elastic-scout package as hero search. Hero search is a scout package. We created this for our own needs. Currently, this was mostly inspred via this course. We will keep add the features base on our needs.
Installation
Make sure you have installed elasticsearch
You should publish Scout and ElasticSearch configuration using:
Package Configuration
In your .env
file, add host and port of your running elasticsearch.
Update scout driver to elasticsearch
as well.
Usage example
Use scout Searchable
trait in your model
Need to add index for your model that is needed to use scout searching
Then import the records
You can also remove imported data by flush command:
Add searchableFields
methods in model to identify your query must be serached in which fields.
Eg:
Then can search by using:
Eg:
Release History
Contributing
- Fork it https://github.com/carro-public/hero-search
- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of herosearch with dependencies
elasticsearch/elasticsearch Version ~7.6
laravel/scout Version ~8|~9|~10