- How do I send a Bluesky notification from a Laravel notification class?
- Extend your notification class with `BlueskyChannel::class` in the `via()` method, then return a `BlueskyPost` instance in `toBluesky()`. The package auto-formats links, mentions, and hashtags. Example: `BlueskyPost::make()->text('Hello!')->language('en')`.
- Does this package work with Laravel 10+? What’s the PHP version requirement?
- Yes, it’s fully compatible with Laravel 8+ and requires PHP 8.1+. The package follows Laravel’s versioning and leverages its notification system natively. Check the [GitHub](https://github.com/spatie/laravel-bluesky-notification-channel) for updates.
- How do I handle Bluesky API rate limits in production?
- Use Laravel’s queue system (e.g., `BlueskyChannel::toBluesky()`) to batch notifications and avoid throttling. Implement exponential backoff in your queue worker for retries. The package itself doesn’t include retry logic but integrates cleanly with Laravel’s queues.
- Can I customize the Bluesky post format beyond basic text?
- Yes, extend the `BlueskyPost` class or use its fluent methods (e.g., `->text()`, `->language()`). For advanced formatting, override the `toBluesky()` method in your notification class. The package supports rich text, but complex layouts may require manual HTML-to-Bluesky conversion.
- Is there a way to track failed Bluesky notifications?
- No built-in tracking, but you can extend the package to emit Laravel events (e.g., `BlueskyNotificationFailed`) or log failures using Laravel’s `failed` queue events. Monitor the `BlueskyChannel` for exceptions and integrate with tools like Sentry or Laravel Horizon.
- What happens if Bluesky’s API changes or breaks compatibility?
- The package is actively maintained (last release: 2026), but Bluesky’s AT Protocol is evolving. Monitor Bluesky’s [developer docs](https://bsky.app/docs) and fork the package if needed. Test changes in a staging environment before production deployment.
- Can I use this for GDPR-compliant notifications with user data?
- Yes, but ensure compliance with Bluesky’s terms and GDPR. Avoid storing sensitive data in Bluesky posts; use Laravel’s encryption for credentials and validate data against Bluesky’s content policies. The package doesn’t persist data—it sends notifications directly via the API.
- How do I test Bluesky notifications in my Laravel app?
- Mock the `BlueskyPost` class in unit tests using Laravel’s `Mockery` or `PHPUnit`. Test edge cases like rich text parsing (e.g., nested links) and verify the `toBluesky()` method returns the expected structure. Example: `BlueskyPost::shouldReceive('make')->andReturn($mockPost)`.
- Are there alternatives if I need more Bluesky features (e.g., analytics)?
- For analytics, extend the package to emit custom events (e.g., `BlueskyNotificationSent`) or log API responses. For broader Bluesky integration, consider [Bsky PHP SDKs](https://github.com/topics/bsky-php) or build a custom service layer. This package focuses solely on notifications.
- How do I configure Bluesky API credentials securely?
- Store credentials in Laravel’s `.env` (e.g., `BLUESKY_API_KEY`) and use the `BlueskyChannel` configuration. Never hardcode keys. For high-security apps, use Laravel Vault or environment variable encryption. The package loads credentials via Laravel’s `config()` system.