- What is esplora/similar used for in Laravel?
- esplora/similar finds similar Eloquent models in Laravel by comparing shared attributes and configurable matching rules. It is intended for related content, you may also like sections, recommendations, deduplication, and similarity-based search. It works from your existing database records through an Eloquent-friendly API without adding an external search service.
- How do I install esplora/similar with Composer?
- Install it with Composer 2 using the package name esplora/similar, then follow the repository README for any publishable config or migrations. The package is described as minimal setup and follows standard Laravel package conventions. Verify auto-discovery and config publishing in a clean Laravel skeleton before rolling it into an existing application.
- Does esplora/similar support Laravel 9 and PHP 8?
- Release 2.2.0 adds PHP 8 and Laravel 9 support, which aligns the package with modern Laravel applications. Laravel 9 requires PHP 8.0.2 or higher, so treat those as a coupled platform baseline. Confirm the exact minimum PHP version in composer.json before committing to the package.
- Can I use esplora/similar with Laravel 8 or PHP 7.4?
- Laravel 8 and PHP 7.4 compatibility is not confirmed by the 2.2.0 release notes. Adding PHP 8 and Laravel 9 support does not prove older runtimes remain supported, and minor releases can still tighten transitive constraints. Check composer why-not esplora/similar 2.2.0 and the package constraints before using it in a Laravel 8 estate.
- How do I configure matching fields for similar Eloquent models?
- The package supports configurable matching fields and comparison logic for determining similarity between Eloquent models. You choose the attributes and rules that matter for your domain, then use the package API to compare records. Check the package config file and README for the exact syntax and supported comparison options.
- How does relevance ordering work and can I customize the similarity strategy?
- Relevance ordering surfaces the closest matches first based on the configured matching fields and comparison rules. The package also supports customizable strategies for domain-specific similarity when simple shared attributes are not enough. Review the public APIs and extension points in the repository before building custom strategies into production.
- Does esplora/similar require Elasticsearch, Algolia, or another external search service?
- No external search service is required according to the package overview. esplora/similar finds similar records directly from your existing database using Eloquent and configurable matching rules. That keeps infrastructure minimal, but you should still evaluate query performance and indexing for large datasets.
- What alternatives to esplora/similar should I consider for Laravel recommendations?
- Alternatives depend on your needs: Laravel Scout with Meilisearch, Algolia, or Elasticsearch is common for full-text and faceted search, while custom Eloquent queries can handle simple related-content logic. esplora/similar is positioned for similarity matching without extra infrastructure. Compare relevance quality, operational cost, and database load before choosing.
- Is esplora/similar safe for Laravel Octane, queues, and production workloads?
- Octane safety is not confirmed in the provided release information, so verify it before using the package in long-lived workers. Look for static mutable state, container captures, and request-scoped assumptions in the source. Test under Octane or queue workers with config caching enabled if those are part of your deployment.
- How should I test and maintain esplora/similar in a production Laravel app?
- Pin the package version on a branch, run the package test suite or application integration tests, and validate in staging with config caching, route caching, and queue workers enabled. Check auto-discovery, config publishing, and migration paths in a clean Laravel 9 skeleton rather than only in an existing app where cached config may hide issues. For maintenance, track the supported PHP and Laravel matrix and keep the package eligible for current Laravel security patches.