ext-redis). Must be installed and configured.BaksDev\SearchRedis\SearchRedisServiceProvider). Can be bootstrapped via config/app.php.SearchRedis::query()->where(...)), it can replace or extend Laravel’s Eloquent queries for search use cases.ModelCreated → index in Redis). Requires custom event binding.Dockerfile/docker-compose.yml or infrastructure-as-code (e.g., Terraform).FT.CREATE). Migrations for schema changes are manual (no Laravel migrations support).spatie/laravel-redis-settings for versioning.SEARCH module with VECTOR fields)?INFO, but custom dashboards may be needed.)ext-redis (v5.3+ for Redis Stack support).redis, database, or laravel-horizon).used_memory, search:query:time).REDIS.md.php.ini to enable ext-redis.composer require baks-dev/search-redis
.env:
REDIS_SEARCH_HOST=localhost
REDIS_SEARCH_PORT=6579
REDIS_SEARCH_PASSWORD=yourpassword
REDIS_SEARCH_TABLE=0 # Optional
redis-cli or a custom Artisan command):
redis-cli -p 6579 FT.CREATE idx:products ON JSON PREFIX 1 products: SCHEMA $.name TAG $.category $.price NUMERIC
php artisan baks:search:redis:index --model=Product).created/updated:
Product::observe(ProductSearchObserver::class);
// Before: DB::table('products')->where('name', 'like', '%phone%')->get();
// After: SearchRedis::query()->where('name', 'phone')->execute();
redis-stack-server:7.4.4 in Docker).LIKE).MAXEXPLAIN, NOOFFSETS).baks-dev/search-redis (low stars/activity = higher risk).FT.CREATE/FT.ALTER commands needed.SEARCH_SCHEMA.md file.composer.json or infrastructure config to avoid surprises.FT.EXPLAIN, FT.SEARCH).REDIS_SEARCH_HOST/PORT/PASSWORD in .env.maxmemory) and JSON schema validity.@name:"phone" vs. name LIKE '%phone%').maxmemory).used_memory and search:query:time metrics.How can I help you explore Laravel packages today?