Download the PHP package alhoqbani/laravel-mobily-ws-notification without Composer

On this page you can find all versions of the php package alhoqbani/laravel-mobily-ws-notification. 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-mobily-ws-notification

Laravel Mobily.ws Notification Channel

Latest Version on Packagist Build Status Code Coverage Total Downloads

This package makes it easy to send notifications using MobilyWs with Laravel 5.4.

Contents

Installation

Package Installation

Install the package using composer:

Add service provider to your array of providers in config/app.php

You don't need to do this step for laravel 5.5+

Publish the configuration file:

Set up mobily.ws account

You must have an account with MobilyWs to be able to use this package.

This package has no affiliation with mobily.ws whatsoever.

Credentials.

There are two methods of authentication when using mobily.ws api.

You could send requests using your login credentials (mobile/password), or by using the apiKey which you can generate from your mobily.ws account.

You must add mobily.ws credentials to your .env file.

Which method to use:

You can define the authentication method you would like to use by editing your config/mobilyws file.

You could choose: auth, password, or auto.

if you choose auto, we will look for the apiKey key first, if not found, we look for the mobile and password

Usage

Create new notification:

Make a new notification class using laravel artisan

and configure the notification class to use MobilyWsChannel.

Or you could use our custom artisan command:

The toMobilyWs method should return a string of the text message to be sent or an instance of MobilyWsMessage.

See Available Message methods for more details.

Routing SMS Notifications:

When sending notifications via the MobilyWs channel, the notification system will automatically look for a phone_number attribute on the notifiable entity. If you would like to customize the phone number the notification is delivered to, define a routeNotificationForMobilyWs method on the entity:

routeNotificationForMobilyWs should return a mobile number to which the SMS message will be sent.

Please note that the mobile number must start with the country code without leading zeros.

For example, 9665xxxxxxxx

Sending SMS:

Scheduled SMS

MobilyWs Api allows for sending scheduled message which will be sent on the defined date/time.

Please note that if you define time in the past, the message will be sent immediately by mobily.ws. This library will not check if the defined time is in the future.

You can define the time on which the message should be sent by mobily.ws by calling time method on the MobilyWsMessage instance.

The time method accepts either a DateTime object or a timestamp.

Available Message methods

In your notification, you must define a method toMobilyWs which will receive the notifiable entity (e.g User model) and an instance of MobilyWsMessage.

This method should return the text of the message to be sent as an SMS to mobily.ws or an instance of MobilyWsMessage.

You can also pass the message to MobilyWsMessage constructor:

return new MobilyWsMessage("Text message");

or set the text message using the msg() method:

Method toMobilyWs will receive an instance of MobilyWsMessage as the 2nd argument.

list of available methods :

text() To add the content of the text message

time() To set time of the scheduled sms.

TODO

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Contributing

Please see CONTRIBUTING for details.

License

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


All versions of laravel-mobily-ws-notification with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
guzzlehttp/guzzle Version ^6.3
illuminate/events Version ^5.4
illuminate/notifications Version ^5.4
illuminate/support Version ^5.4
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 alhoqbani/laravel-mobily-ws-notification contains the following files

Loading the files please wait ....