- How do I install sendynl/php-sdk in Laravel?
- Install it with Composer using composer require sendynl/php-sdk. Because the package is framework-agnostic, you can use it in Laravel by autoloading Composer and instantiating the client in a service, controller, or job. There is no requirement to use Laravel-specific wiring unless you choose to add it yourself.
- Is sendynl/php-sdk Laravel-only or framework-agnostic?
- No. The package is described as a lightweight, framework-agnostic PHP SDK, so it works in Laravel, plain PHP, and other PHP frameworks. In Laravel you can wrap it in a singleton binding or service class if you want dependency injection.
- What Sendy API credentials does sendynl/php-sdk need?
- You typically need the base URL of your Sendy installation and your Sendy API key. Sendy API keys are tied to a brand/list configuration, so confirm which key your installation expects. Keep these values in environment variables or Laravel's config system rather than hard-coding them.
- Can sendynl/php-sdk manage mailing lists and subscribers?
- Yes. The SDK is intended for managing mailing lists and subscribers through Sendy's API, alongside campaigns. The exact methods are defined in the package source and documentation, so check those for the calls you need.
- Does sendynl/php-sdk support campaigns?
- The package overview says it covers campaigns as well as lists and subscribers. That generally means you can use it for campaign-related API operations from your Laravel or PHP code. Confirm the exact campaign methods and required parameters in the SDK docs before building your workflow.
- Which Laravel and PHP versions does sendynl/php-sdk support?
- The provided package context does not list supported Laravel or PHP versions. Check the require section in the package's composer.json on Packagist or its repository before installing. For Laravel, also confirm compatibility with your framework's PHP constraint.
- How can I test sendynl/php-sdk without sending to real subscribers?
- Point the SDK at a staging or test Sendy installation and use non-production lists and subscribers. For automated tests, put your own wrapper around the client and mock that wrapper so your test suite does not call the real Sendy API. This keeps tests fast and avoids accidental sends.
- Is sendynl/php-sdk safe to use in production?
- Treat it as a thin API client: secure your Sendy API key, set sensible HTTP timeouts, and handle API errors in your application. Because it is lightweight, features like retries, queueing, and logging are likely your responsibility. Run a staging check before using it for live subscriber or campaign operations.
- What are alternatives to sendynl/php-sdk for Sendy in Laravel?
- Alternatives include other Sendy API wrappers and custom HTTP clients built on Guzzle or Laravel's HTTP client. This package's main differentiators are its lightweight, framework-agnostic design and simple configuration. Compare current maintenance, API coverage, and response handling before choosing.
- How should I handle Sendy API errors with sendynl/php-sdk?
- The package is described as providing predictable responses, but you should still check each API call's result and handle failure cases. Sendy's API returns success and error responses, so log non-success responses and surface actionable errors to your application. Consult the SDK source for the exact response objects or arrays it returns.