- How do I install the Infobip notification channel for Laravel?
- Install it with Composer by running composer require laravel-notification-channels/infobip. Laravel package auto-discovery registers the service provider, so a manual provider entry is usually not needed. After installation, publish the package configuration if the README instructs it and add your Infobip credentials before sending notifications.
- How do I configure my Infobip credentials in Laravel?
- Add your Infobip account credentials to the package configuration file, typically after publishing the config and setting values such as your API key, base URL, and default sender. Keep these values in your .env file rather than committing them to source control. The exact configuration key names are documented in the README and may differ between package versions.
- How do I send a Laravel notification through Infobip SMS?
- Create a Laravel notification class and add the Infobip channel to its via method. Implement the toInfobip method to return an InfobipMessage containing the SMS text and any sender or recipient options. The channel then resolves the recipient phone number from the notifiable's routeNotificationForInfobip method or from an explicitly provided recipient.
- Which Laravel versions does laravel-notification-channels/infobip support?
- The package targets modern Laravel releases that support notification channels and package auto-discovery. Check the composer.json constraints in the repository for the exact Laravel and PHP versions supported by the release you install. Older Laravel versions may work with older tagged releases, but verify compatibility before upgrading.
- How do I set the sender or from number for Infobip SMS messages?
- Set the sender in your InfobipMessage or through the package's default configuration, depending on the package version. Infobip requires an approved sender name or number for many destinations. If you leave it unset, the package may fall back to the configured default, so confirm the expected behavior in the README.
- Can I send an Infobip notification to multiple recipients?
- Laravel notifications normally resolve one phone number per notifiable through routeNotificationForInfobip. For multiple recipients, send separate notifications or return a recipient list if the package's message object supports it. Check the message API and README for the recipient handling supported by your installed version.
- How can I test Infobip notifications without sending real SMS messages?
- Use Laravel's Notification::fake method in your tests and assert that the notification was sent on the Infobip channel. For integration tests, point the package at a sandbox or test endpoint if Infobip provides one. Avoid hitting production SMS endpoints from automated test suites.
- Is this Infobip channel actively maintained, and what are the alternatives?
- The package belongs to the laravel-notification-channels community collection, which provides channels for many SMS and messaging providers. Maintenance varies by channel, so review recent commits, open issues, and tagged releases before adopting it. Alternatives include other SMS notification channels or a custom Laravel channel built directly on Infobip's API client.
- Does the Infobip notification channel support queued notifications in production?
- Laravel notifications can implement ShouldQueue to send asynchronously, and the Infobip channel works inside queued notifications. In production, store credentials in environment variables, monitor failed jobs, and account for provider rate limits or errors. Test with a small recipient set before rolling out to a larger audience.
- How do I handle errors and delivery reports with the Infobip channel?
- Sending errors typically surface as exceptions from the channel and can be handled through Laravel's queue failure handling or your own try and catch logic. Delivery receipts are generally managed in Infobip's dashboard or through its API rather than by the notification channel itself. Check the package source or README for any response data it exposes.