Download the PHP package karlos3098/simply-connect-laravel-notifications without Composer
On this page you can find all versions of the php package karlos3098/simply-connect-laravel-notifications. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download karlos3098/simply-connect-laravel-notifications
More information about karlos3098/simply-connect-laravel-notifications
Files in karlos3098/simply-connect-laravel-notifications
Package simply-connect-laravel-notifications
Short Description It allows you to send SMS from the simply-connect.ovh platform via Laravel notifications
License MIT
Informations about the package simply-connect-laravel-notifications
Simply Connect Laravel Notifications
A library dedicated to Laravel 10/11 introducing integration with Simply Connect for the built-in notification class in Laravel
In the words of introduction. The Simply Connect application is also my project, the aim of which is to send SMS from YOUR devices. All you need to do is create an account on the platform, find an old Android phone in the drawer, install the .apk and that's it. Detailed information can be found on the portal
Install:
Then add the API key from the simply-connect.ovh platform and the ID of the device from which messages will be sent to the .env
If you want to send an SMS message, create a new notification class in the same way as for sending emails, but additionally declare the toSimplyConnect method. it is also recommended to use the SimplyConnectNotification interface
In this way, the message will be sent to the number that should appear in the "phone_number" field in a given model.
If you need a more universal method to implement a phone number, use the HasDifferentPhoneNumberForSimplyConnect extension in your model and then add the routeNotificationForSimplyConnect method.
You can also enter the phone number directly in the notification if you need it.
If you want to add multiple phone numbers, this is also possible.
For convenience, you can also use the line() and breakLine() methods to make your SMS more readable.
The message you send will be added to the queue, but you can download its ID, based on which you will later be able to check its status.
Example application in a controller. Detailed information about what is in the message object can be found in the Simply Connect API Docs
You can use a different device id and a different API key directly in the notification. If you use a different API key, remember that if you need to retrieve message details later, you must do so with the appropriate key.
It may also happen that the telephone number, device ID or whatever you provided is incorrect and the form data will be rejected. In this case, an exception will be thrown as in the example below. $array contains a list of form errors.