illuminate/support and illuminate/database ensures high compatibility with Laravel 8+._source field or pagination APIs). However, the lack of explicit support for Elasticsearch 6.x may limit legacy system adoption.queue:failed table).elasticsearch/elasticsearch) as a dependency, increasing deployment complexity (e.g., Docker configurations, connection pooling). For serverless or edge deployments, this may require additional infrastructure (e.g., managed Elasticsearch like AWS OpenSearch).spatie/laravel-searchable) that could be deprecated in favor of Plastic?laravel-debugbar) be needed?_search API calls) to map them to Plastic’s fluent syntax.Product or Article) and Plastic’s basic CRUD operations.where('name', 'like', '%term%')) with Plastic’s search() method.migrate command to sync existing indices with Laravel models.config/plastic.php or via model events (booted)._source vs. stored_fields).type field in 8.x).elasticsearch/elasticsearch may be loaded twice). Use Laravel’s PackageServiceProvider to resolve bindings.scout:import) will need rewriting.config/plastic.php (e.g., host, port, index prefix).composer require sleimanx2/plastic.php artisan vendor:publish --tag=plastic-config.use Sleimanx2\Plastic\Traits\Searchable;.getPlasticMapping() or use auto-mapping.class Product extends Model
{
use Searchable;
public function getPlasticMapping()
{
return [
'properties' => [
'name' => ['type' => 'text', 'analyzer' => 'english'],
'price' => ['type' => 'float'],
'tags' => ['type' => 'keyword'],
],
];
}
}
// Before (raw client)
$results = $client->search(['index' => 'products', 'body' => [...]]);
// After (Plastic)
$results = Product::search('term')->paginate(10);
sleimanx2/plastic for breaking changes (e.g., Elasticsearch 8.x compatibility).migrate command to update indices when modelsHow can I help you explore Laravel packages today?