Download the PHP package gabeta/laravel-custom-sms-channels without Composer

On this page you can find all versions of the php package gabeta/laravel-custom-sms-channels. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-custom-sms-channels

Laravel custom sms channels

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Laravel notification channels package for a few SMS providers. The specificity of this package is that you can combine several SMS sending services (supported by the package) in the same project without adding additional code. Have you always wanted to receive your SMS locally? preview them make consequent adjustments? We also offer you this functionality.

Installation

You can install the package via composer:

You can publish the config file with:

Setting up your SMS provider

Usage

Now you can use the channel in your via() method inside the notification:

The customsms channel will automatically use the provider you have defined by default in your configuration file. It should be noted that a channel will be created for each provider supported by the package. See the list of channels supported.

In order to let your Notification know which user(s) phone number you are targeting, add the routeNotificationForCustomSms method to your Notifiable model. The routeNotificationForCustomSms method must return an instance of Gabeta\CustomSmsChannels\PhoneNumber.

In the example above (the dial code and number are stored in separate fields) we return an instance of Gabeta\CustomSmsChannels\PhoneNumber while setting the dial_code without any prefix (+ or 00) and the phone number. There are providers that use the dial code and number without a prefix to send SMS others use the + or 00 prefix. The system will take care of the formatting according to of each provider. If the number and dial code are stored in the same field you can set with method.

We advise you to provide the telephone number without the prefix. As mentioned above top the system will take care of the prefixing according to the provider.

Preview SMS Localy

To preview your SMS locally use the sms_log driver activate the preview in your config file.

Publish dashboard assets:

Go to: http://YOUR_HOST/customs-sms-dashboard for preview your SMS.

Provider supporter

Providers channel via method route notification method
log ✅ log toLogSms routeNotificationForLogSms
infobip ✅ infobip toInfobip routeNotificationForInfobip
twilio ✅ twilio toTwilio routeNotificationForTwilio

You could use via or route notification method if you want behavior channel-specific. The package tries to find the via method and the route notification method specific to its provider if it does not find it it will call the routeNotificationForCustomSms functions and toCustomSms.

Would you like to combine a notification channel package such as Laravel vonage package with our package ? Yes it is possible. you must first install their package then add their channel with null value in the supported provider in the config file.

Example:

Testing

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-custom-sms-channels with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0|^8.1
cboden/ratchet Version ^0.4.4
guzzlehttp/guzzle Version ^7.4
illuminate/contracts Version ^7.0|^8.0|^9.0
illuminate/notifications Version ^7.0|^8.0|^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gabeta/laravel-custom-sms-channels contains the following files

Loading the files please wait ....