Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Elasticquent Laravel Package

waska14/elasticquent

Integrates Elasticsearch with Laravel's Eloquent models, letting you index records, define mappings, and run search queries directly from your models. A community fork of the Elasticquent package.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with Composer using a v2 constraint: composer require vendor/package:^2.0. v2.0.0 explicitly adds support for laravel/framework:^7.0, so confirm your app is on Laravel 7 and PHP 7.2.5+ before upgrading. If you are still on Laravel 6, stay on the package's v1 release line.
  • Look first at the package's composer.json (extra.laravel.providers / extra.laravel.aliases), README, and tests. Laravel 7 auto-discovers service providers by default, so you usually do not need to edit config/app.php.
  • Publish any package config with php artisan vendor:publish --provider="Vendor\\Package\\PackageServiceProvider" (use the provider named in composer.json). Set the required env/config values before first use.
  • First use case: resolve the package's main class from the container in php artisan tinker or a small test route, then exercise its primary facade/service/command. This verifies bindings and config before wiring it into production code.
  • After install or upgrade, run composer dump-autoload, php artisan package:discover, and php artisan config:clear.

Implementation Patterns

  • Prefer constructor injection or app() resolution over new so the package's config, bindings, and decorators apply. If the package exposes a facade, use it for terse calls but inject the underlying service in tests.
  • Keep environment-specific values in config/<package>.php and .env. Use config:cache in production, and re-publish config only when the package documents new keys.
  • Upgrade workflow from v1 to v2: change the constraint to ^2.0, run composer update vendor/package --with-dependencies, re-publish config if needed, clear caches, and run the full test suite. Treat v2.0.0 as a major release even though the release note is terse.
  • Wire package events/listeners through EventServiceProvider; if the package dispatches jobs, configure the queue connection and test with Queue::fake().
  • In tests, use the package's fakes or bind a mock in the container. Assert container bindings with $this->app->bound(...) and verify config values before exercising behavior.
  • For Laravel 7 integration, use the framework's HTTP client, event discovery, and route/model conventions where the package expects them. If package discovery is disabled in your app, register the provider manually in config/app.php.

Gotchas and Tips

  • v2.0.0 only documents Laravel ^7 support. It may drop Laravel 6 compatibility. Pin ^1.0 if you cannot upgrade Laravel yet.
  • Laravel 7 uses Symfony 5 components, so transitive dependency conflicts are common. Diagnose with composer why-not vendor/package 2.0.0 and check the package's composer.json requirements.
  • After changing config or env values, run php artisan config:clear locally and php artisan config:cache during deployment. Stale config caches are a frequent source of "why isn't this working" issues.
  • If the package's facade alias is missing, check config/app.php aliases or use the fully qualified class name. Run php artisan package:discover after Composer changes.
  • Debug by resolving the package class in tinker, checking app()->bound(...), and reviewing storage/logs/laravel.log. Enable any package-specific debug config if available.
  • Extension points usually include publishable config, container bindings, events/listeners, and macros. Override bindings in AppServiceProvider::register() after the package provider loads.
  • Read the package's changelog/UPGRADE notes and run its test suite against your app. A major version bump with a one-line release note can still hide breaking changes in bindings, config keys, or method signatures.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle