Download the PHP package natsumework/redis-autocomplete without Composer
On this page you can find all versions of the php package natsumework/redis-autocomplete. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download natsumework/redis-autocomplete
More information about natsumework/redis-autocomplete
Files in natsumework/redis-autocomplete
Package redis-autocomplete
Short Description Provide an easy way for your laravel app to use redis to speed up autocomplete queries.
License MIT
Informations about the package redis-autocomplete
Redis Autocomplete for laravel
Provide an easy way for your laravel app to use redis to speed up autocomplete queries.
Contents
- Installation
- Configuration
- Usage
- Changelog
- Testing
- Security
- Contributing
- Credits
- License
Installation
Install this package via composer:
Publish the configuration file to config/redis-autocomplete.php
:
Configuration
config/redis-autocomplete.php
Usage
Add phrases
Note:
- The phrase must contain
id
andname
as attributes - phrase
id
must be unique - When searching, it will be searched by phrase
name
- You may specify the
score
attribute of phrase to sort the phrases, and the search results will be retrieved in descending order of score.
If the score is not specified, the default will be 0 - You can add any other attributes to the pharse
You may also use collections
or use Eloquent Collections
Search
Remove phrase
Note that the id
and name
of the phrase must be the same as when it was added
Connection
You may obtain a connection to a specific Redis connection using the Autocomplete facade's connection method
Ttl
You may obtain a ttl to a specific expiration using the Autocomplete facade's ttl method
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Contributing
Please see CONTRIBUTING for details.
Credits
- natsumework
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of redis-autocomplete with dependencies
illuminate/redis Version ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
illuminate/config Version ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
php Version ^7.3 || ^8.0