- How do I install sharpapi/sharpapi-laravel-client in a Laravel app?
- Install it with Composer using composer require sharpapi/sharpapi-laravel-client. Laravel package auto-discovery should register the service provider and facade without manual edits. After installation, publish the configuration file if the package provides one and set your SharpAPI credentials.
- Where do I set the SharpAPI API key for the Laravel client?
- The client is configured through its Laravel config file, typically populated from an environment variable such as SHARPAPI_API_KEY. Publish the package config with artisan vendor:publish, then add the key to your .env file and never commit it. Clear cached config after changes with php artisan config:clear.
- Does sharpapi/sharpapi-laravel-client support Laravel 12?
- Version 1.2.4 of the package adds Laravel 12 compatibility according to its changelog. Before upgrading, confirm the composer.json constraints still include the Laravel version you run today. Also check that the package's PHP requirement matches your application's PHP version.
- Which Laravel and PHP versions does this package require?
- The package tracks Laravel's release cadence and added Laravel 12 support in v1.2.4. Laravel 12 itself requires PHP 8.2 or newer, but you should verify the package's own composer.json for its exact PHP floor and framework constraints. If you are on Laravel 10 or 11, confirm those constraints were not dropped in the patch.
- How do I call SharpAPI content generation from Laravel using the facade?
- Use the package facade after installation and configuration, importing it at the top of your class. The facade exposes SharpAPI automation features such as content generation, translation, summarization, and sentiment analysis. Check the package README for the exact method names and parameter signatures before wiring it into your workflow.
- Can I fake or mock SharpAPI calls when testing Laravel code?
- Yes, you should isolate your tests from the live SharpAPI service. Depending on how the package binds its client, you can mock the facade, swap the underlying client in the container, or fake the HTTP layer. Assert that your application handles successful responses and API errors without making real network calls.
- Is sharpapi-laravel-client suitable for production use?
- It can be used in production if you secure the API key, handle exceptions and timeouts, and respect SharpAPI's rate limits and quotas. Long-running AI workflows should usually be dispatched to Laravel queues rather than run inside web requests. Review the package's error handling and retry behavior before relying on it for critical paths.
- What changed in sharpapi-laravel-client v1.2.4?
- The published changelog lists Laravel 12 compatibility as the change in v1.2.4. Because it is a patch release, the framework constraint should be additive and no application code should be required. Review the composer.json diff to confirm no older Laravel versions or PHP support were removed.
- How does this package compare to calling the SharpAPI API directly?
- The Laravel client wraps SharpAPI's AI automation endpoints in a service provider, facade, and publishable config, which reduces boilerplate compared with raw HTTP calls. Direct API calls give you more control but require you to manage authentication, payloads, errors, and retries yourself. Choose the package if you want the standard Laravel integration and are comfortable with its maintenance cadence.
- How actively maintained is sharpapi/sharpapi-laravel-client?
- Public evidence is limited, so check the GitHub releases, issue backlog, and CI status before adopting it. The v1.2.4 release shows the maintainers are tracking Laravel 12, which is a positive signal. For production, confirm release frequency and whether more than one maintainer is active.