- How do I install the TouchEstate PHP SDK in a Laravel project?
- Run `composer require touchestate-sdk/php-sdk` in your Laravel project directory. The SDK is designed to work with Laravel’s service container, so no additional setup is required beyond publishing config files if the package provides them. Check the package’s `config/` directory for Laravel-specific configurations.
- Does this SDK support Laravel’s HTTP client (Guzzle) for API calls?
- Yes, the SDK is built to integrate with Laravel’s built-in HTTP client (Guzzle), which means you can leverage Laravel’s caching, middleware, and retry mechanisms out of the box. This reduces vendor lock-in and aligns with Laravel’s ecosystem.
- What Laravel versions does the TouchEstate SDK officially support?
- The SDK’s documentation should specify Laravel version compatibility, but based on typical PHP SDK patterns, it likely supports Laravel 9.x and above. For Laravel 10.x or 11.x, verify the package’s `composer.json` for PHP 8.2+ syntax compatibility or check the GitLab repository for updates.
- How does the SDK handle authentication with TouchEstate’s API?
- The SDK likely supports OAuth2 or API keys for authentication. For Laravel integration, you can use Sanctum or Passport to manage token refreshes and scopes if the SDK doesn’t handle them natively. Check the package’s docs for specific authentication methods and Laravel-specific configurations.
- Can I use Laravel Queues to offload API calls made by this SDK?
- Yes, the SDK’s synchronous API calls can be wrapped in Laravel Queues to avoid blocking the request lifecycle. For example, dispatch a job for heavy operations like bulk property updates or tenant management. The SDK’s client should be injectable into your queue jobs.
- Are there examples of testing the SDK in a Laravel environment?
- The SDK may include example tests, but for Laravel integration, use PHPUnit or Pest to mock API responses. The SDK should provide a mockable client interface, allowing you to test your Laravel services without hitting the real TouchEstate API during unit tests.
- Does the SDK support webhooks for real-time updates from TouchEstate?
- If TouchEstate’s API supports webhooks, the SDK may include helpers to validate signatures (e.g., HMAC) and trigger Laravel events or broadcast updates via Echo. Check the package’s docs for webhook-specific classes or middleware to integrate with Laravel’s event system.
- What happens if the TouchEstate API rate limits my requests?
- The SDK may include built-in retries or exponential backoff for rate limits, but if not, you can wrap its client in Laravel middleware like `ThrottleRequests` to handle rate limiting at the application level. Ensure the SDK’s exceptions are compatible with Laravel’s error handling.
- Can I use this SDK in a standalone PHP project, not just Laravel?
- Yes, the SDK is designed to work in both Laravel and standalone PHP applications. For Laravel, it leverages the framework’s service container and facades, but all core functionality (API clients, helpers) remains usable outside Laravel.
- Are there any known limitations or missing features in the SDK?
- Since the SDK is official but may lack community adoption, check the GitLab repository for open issues or undocumented features. Common gaps could include limited API coverage (e.g., missing endpoints for niche TouchEstate services) or lack of advanced features like idempotency for payments. Test thoroughly for your use case.