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

Laravel Jarvis Laravel Package

sectheater/laravel-jarvis

Laravel Jarvis adds an AI assistant to Laravel apps, letting developers interact with their application through natural language. Register tools and actions so Jarvis can query data and perform tasks securely via OpenAI-powered commands and Laravel-native integrations.

View on GitHub
Deep Wiki
Context7

Getting Started

Install the package with Composer and let Laravel auto-discover its service provider. If the package publishes config or migrations, publish them first and review the defaults before writing application code.

Start by reading:

  1. The package README for the $observers property syntax.
  2. The package src/ directory for the Register method and repository bindings.
  3. The new unit tests added in v2.1.4, which are the best current reference for expected observer, repository, and registration behavior.

A first practical use case is observing a model column that drives workflow state. For example, map a status column to a snake_case handler method on the model, then use that handler to send notifications, write audit records, or dispatch follow-up jobs when the column changes.

protected $observers = [
    'status' => 'handle_status_change',
];

Run the package tests and your own model tests after installing, especially because v2.1.4 includes fixes to repositories and the Register method.

Implementation Patterns

Use the $observers property as a declarative map from database column names to snake_case handler methods. Keep the mapping close to the model so column-level behavior is visible where the model is defined.

protected $observers = [
    'status' => 'status_changed',
    'published_at' => 'published_at_changed',
];

Keep observer handlers small. Prefer dispatching events or jobs from the handler rather than performing slow I/O directly, because the handler may run during normal model saves. This is especially important if a single request updates multiple models.

Integrate observers with repositories by separating responsibilities:

  • Repositories handle persistence and query concerns.
  • Observers handle column-change side effects.
  • Service classes coordinate transactions and dispatch domain events.

If the package’s Register method binds repository implementations into the container, verify those bindings in a service provider test. After the v2.1.4 fixes, confirm that resolved repository instances are the expected concrete classes and that custom bindings still take precedence.

Use model saves rather than mass updates when observers must run. Column observers typically depend on model events, so Model::where(...)->update(...) can bypass them.

For testing, assert that the handler is invoked when the observed column changes and is not invoked when unrelated columns change. If the handler dispatches jobs or events, use Laravel’s Event::fake() or Queue::fake() and assert the expected side effect.

Gotchas and Tips

The v2.1.4 release is a patch release, but it includes fixes to repositories and the Register method. Re-run your application test suite after upgrading, particularly if you had worked around previous registration or repository-resolution behavior.

Observer array keys must match actual database column names exactly. The handler values should use snake_case as documented; a camelCase method name may not resolve if the package performs string-based method lookup.

Avoid recursive saves inside observer handlers. If a handler updates the same model or triggers another save on the same column, guard with dirty-attribute checks or move the work to a queued job.

Column observers generally do not fire for mass updates, raw queries, or inserts that bypass model events. If those paths matter, dispatch equivalent domain events explicitly.

After upgrading, clear cached config and container bindings:

php artisan config:clear
php artisan cache:clear
composer dump-autoload

If repository resolution behaves unexpectedly, inspect the package’s Register method and your own service provider binding order. Container bindings registered later can override package defaults.

Use the newly added unit tests as debugging documentation. They are useful for confirming edge cases around observer mapping and repository registration. When adding your own handlers, log the old and new column values temporarily during development so you can verify the observer is seeing the transition you expect.

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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast