Weave Code
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
Anthropic Php

Anthropic Php Laravel Package

mozex/anthropic-php

PHP client for Anthropic’s Claude API. Provides a simple, typed interface for sending messages and handling responses, with support for streaming, models, and common request options—easy to integrate into Laravel or any PHP app.

View on GitHub
Deep Wiki
Context7

PHP client for the Anthropic API: messages, streaming, tool use, thinking, web search, code execution, batches, and more.

Frequently asked questions about Anthropic Php
How do I install the mozex/anthropic-php package in a Laravel project?
Run `composer require mozex/anthropic-php` in your project directory. The package is designed for Laravel, so it should integrate with the service container automatically. Check for a `config/anthropic.php` file post-installation for basic setup instructions, though full documentation is currently limited.
Does this package support Laravel’s HTTP client for API requests?
The package claims Laravel-friendly design, implying compatibility with Laravel’s HTTP client. However, without access to the source code, we cannot confirm if it leverages Laravel’s built-in `Http` facade or requires a separate Guzzle/PHP HTTP client. Review the package’s documentation or source (if available) for specifics.
Can I use this for streaming responses from Claude’s API?
Yes, the package explicitly mentions support for streaming responses. It should handle real-time output from Claude’s API, but verify the implementation details in the source code or documentation to ensure it meets your latency and event-handling requirements.
What Laravel versions are supported by this package?
The package description does not specify Laravel version support. Since it’s designed for Laravel, it likely targets Laravel 9+ or 10+. Check the package’s `composer.json` (if accessible) or contact the maintainer for version compatibility details.
How do I handle tool use and function calls in Claude’s API with this client?
The package claims support for tool use and function calls, which typically involve defining tools and handling responses. Look for methods like `withTools()` or similar in the API documentation. If the source is unavailable, test with a simple tool definition to confirm functionality.
Is there built-in support for error handling and retries?
The package description does not mention explicit error handling or retry logic. Laravel’s HTTP client supports retries via middleware, but the package’s implementation is unverifiable. You may need to wrap API calls in custom retry logic or middleware if robustness is critical.
Can I use this package for batch processing or asynchronous tasks?
The package description mentions batch processing support, but without source code access, we can’t confirm how it handles queues or async workflows. For Laravel, you might need to integrate it with queues manually if the package lacks native support.
Are there alternatives to this package for Laravel?
Yes, alternatives include official Anthropic SDKs (if PHP wrappers exist) or community packages like `php-ai/anthropic`. Evaluate these based on features, Laravel integration, and maintenance. This package’s lack of public documentation may make alternatives more appealing for production use.
How do I test this package in a Laravel application?
Test by mocking the Anthropic API responses using Laravel’s HTTP testing tools or libraries like VCR. Since the package is unverified, ensure your tests cover edge cases like rate limits, tool failures, or streaming interruptions. Document assumptions if the package lacks test coverage.
What are the risks of using this package in production?
Risks include unverified error handling, lack of public documentation, and unknown maintenance status. Without source code access, you can’t audit security or performance. Consider starting with a proof-of-concept and monitoring closely in staging before production deployment.
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.
anousss007/vigilance
supportpal/eloquent-model
ardenexal/fhir-models
laravel-at/laravel-image-sanitize
romalytar/yammi-audit-log-laravel
ardenexal/fhir-validation
arshaviras/weather-widget
laravel-chronicle/core
sunchayn/nimbus
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon