Download the PHP package allanvb/laravel-semysms without Composer

On this page you can find all versions of the php package allanvb/laravel-semysms. 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-semysms

Laravel package for SMS mailing service SemySMS

Packagist Version GitHub last commit License Sonar

Package that integrates SemySMS API into your Laravel 5 app.

Installation:

Laravel 5.5+

If you're using Laravel 5.5 or above, the package will automatically register provider and facade.

Laravel 5.4 and below

Add Allanvb\LaravelSemysms\SemySmsServiceProvider to the providers array in your config/app.php:

Add an alias in your config/app.php:

Or you can use the facade class when needed:

Overview

Look at one of the following topics to learn more about SemySMS package.

Configuration

You can use php artisan vendor:publish to copy the configuration file to your app's config directory:

Then update config/semy-sms.php with your credentials. Also you can update your .env file with the following:

All methods uses Validator to validate passed data.

By default, methods will try to use for all requests the device you specified in your SEMYSMS_DEVICE_ID variable.

Usage:

To use the SemySMS Library you can access the facade, or request the instance from the service container:

Or

All methods and events will return a Collection, so you can use all available methods to manipulate response. For example: SemySMS::getInbox()->sortByDesc('date');

Examples

Sending simple message

Available parameters:

device_id parameter can also take the active value which means that the service will distribute new SMS between all your active devices.

Sending multiple messages

Available parameters:

In case you want to have more control on sending multiple messages you can use chaining methods.

Available parameters:

Sending USSD requests

You can use 'device_id' parameter to perform USSD request from specific device.

List of outgoing SMS

Optional, you can specify a interval of time you want to get by using Interval helper like this.

List of incoming SMS

Delete outgoing SMS

Delete incoming SMS

deleteOutbox() and deleteInbox() methods will return deleted messages.

Optional, you can use filter for getOutbox(), getInbox(), deleteOutbox() and deleteInbox() methods.

Available parameters:

List of devices

By default this method will return list of all devices connected to account.

Available parameters:

Cancel sending SMS

This method will cancel all SMS which was not sent to your default device.

You can request canceling of all SMS for specific device by passing device_id, or specific message by passing sms_id to array.

Events

The package have events built in. There are three events available for you to listen for.

Event Fired Parameter
semy-sms.sent When message sent. 'To' and 'text' parameters of SMS that was sent.
semy-sms.sent-multiple When multiple message sent. List of phones, devices and message that was sent.
semy-sms.received When new message income. DeviceID, Sender and Text of income message.
semy-sms.ussd-response When ussd response income. DeviceID, Sender and Text of income message.

Notification channel

This package also provide notification channel for SemySMS.

To use notification channel you must use SemySmsChannel::class in via method of your notification class. After that you will be able to use toSemySms() method for sending messages.

See example below.

You can add recipient in two ways.

If you'll use both, then to() method will be used as primary.

Exceptions

The package can throw the following exceptions:

Exception Reason
SemySmsValidationException When method params don't pass validation.
RequestException When HTTP response will be different than 200.
SmsNotSentException When something went wrong with the request to SemySMS servers.
InvalidIntervalException When you pass invalid Interval

Extra

Receiving message from devices

If you want to get incoming messages from your devices, you can use

https://yourdomain.com/semy-sms/receive route in your SemySMS control panel.

To get this route working you need make some actions:

After that, you will be able to listen for semy-sms.received Event.

If you performed an ussd request, you can listen for semy-sms.ussd-response Event to process USSD response.

In case that you get USSD response as SMS, you can add sender name to ussd_senders in your config file.

You can get more information about Events in Laravel official documentation

Intervals

Interval class offers the following methods: hours(), days(), weeks(), months() and years().

If you want to have more control on Interval you can pass a startDate and an endDate to the object.

License

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


All versions of laravel-semysms with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-json Version *
guzzlehttp/guzzle Version ^6.3|^7.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 allanvb/laravel-semysms contains the following files

Loading the files please wait ....