Download the PHP package ghasedak/laravel-notification without Composer
On this page you can find all versions of the php package ghasedak/laravel-notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ghasedak/laravel-notification
More information about ghasedak/laravel-notification
Files in ghasedak/laravel-notification
Download ghasedak/laravel-notification
More information about ghasedak/laravel-notification
Files in ghasedak/laravel-notification
Vendor ghasedak
Package laravel-notification
Short Description Ghasedak SMS Notifications Channel for Laravel
License MIT
Homepage https://github.com/ghasedakapi/Ghasedak-Laravel-Notification
Package laravel-notification
Short Description Ghasedak SMS Notifications Channel for Laravel
License MIT
Homepage https://github.com/ghasedakapi/Ghasedak-Laravel-Notification
Please rate this library. Is it a good library?
Informations about the package laravel-notification
Ghasedak Laravel Notification
Easy-to-use SDK for implementing Ghasedak SMS Notification in your Laravel projects.
Explore the docs »
Web Service Documents
·
REST API
.
Report Bug
·
Request Feature
## Table of Contents * [Install](#install) * [Setting up Ghasedak service](#setting-up-ghasedak-service) * [Add environmental variables to .env file](#add-environmental-variables-to-env-file) * [Usage](#usage) * [Parameters of GhasedakSimpleSms() method](#parameters-of-ghasedaksimplesms-method) * [Sending Notifications](#sending-notifications) * [Example](#example) * [One-Time Passwords (OTP)](#one-time-passwords-otp) * [Parameters](#parameters-1) * [Example](#example-1) * [Licence](#license) ## Install The easiest way to install is by using Composer: Composer is a dependency manager for PHP which allows you to declare the libraries your project depends on, and it will manage (install/update) them for you. If you are not familiar with Composer, you can read its documentations and download it via [getcomposer.org](https://getcomposer.org/). ### Setting up Ghasedak service To setup Ghasedak service properly you need an API key. To get that you should have a [Ghasedak](https://ghasedak.me) account. Register and get your API key.
Then you need to set simple configuration by adding following code to your `services.php` file. ### Add environmental variables to .env file As final step of installing the package, you must add previousley defined variables to `.env` file. Don't forget to replace `your_api_key` and `your_line_number` with actual information. ## Usage To use notifications in Laravel you should first create one with simple Artisan command: Then you can use the channel in your `via()` method inside the notification you just created: As default `phone` field is set for receptor, but you can add `routeNotificationForSms` method to your Notifiable model to customize phone number: ## Parameters of `GhasedakSimpleSms()` method | Parameter | Required | Description | Type | Example | | --- | --- | --- | --- | --- | | message | Yes | Text to be sent | string | Hello, World! | | receptor | Yes | The number of the recipient(s) of the message (seperated by comma `,`). | string | 09111111111 | | linenumber | No | The number of the sender of the message, which, if not specified, will be selected from your dedicated lines with a higher priority.**** | string | 5000222 | | senddate | No | The exact date and time of sending the message based on Unix time, if not specified, the message will be sent instantly. | string | 1508144471 | | checkid | No | It is used to set a unique number for each SMS, and after sending the SMS, all the information of the sent message can be received with the `status` method. | string | 2071 | ## Sending Notifications Notifications may be sent using the `notify` method of the Notifiable trait: ## Example Here is a sample code for `SendSimple` Notification **with support for custom parameters** instead of using a fixed template: Send notification using `notify` method: ## One-Time Passwords (OTP) The One-Time-Password (OTP) Interface is used to perform a mobile authentication or to implement Two-Factor-Authentication (2FA). ## Parameters | Parameter | Required | Description | Type | Example | | --- | --- | --- | --- | --- | | receptor | Yes | The number of the recipient of the message. | string | 09111111111 | | type | Yes | Set `1` to send text message and `2` to send voice message. | int | Hello, World! | | template | Yes | The title of the template you created in your panel. | string | my-template | | checkid | No | It is used to set a unique number for each SMS, and after sending the SMS, all the information of the sent message can be received with the `status` method. | string | 2071 | | params | Yes | Array of parameters (You must enter at least one parameter). | array of strings | abcdef | ## Example The following is a sample code for `SendOTP` Notification **with support for custom parameters** instead of using a fixed template: Send notification using `notify` method: :) ## License Freely distributable under the terms of the [MIT](https://opensource.org/licenses/MIT) license.
All versions of laravel-notification with dependencies
PHP Build Version
Package Version
Requires
ghasedak/laravel Version
~1.0.0
The package ghasedak/laravel-notification contains the following files
Loading the files please wait ....