This is a Laravel package for msegat. Its goal is to remove the complexity

Overview

laravel-msegat package

This is a Laravel package for msegat. Its goal is to remove the complexity

Laravel Msegat Package

Unit Tests Packagist License Latest Stable Version Total Downloads

This is a package for msegat. Its goal is to remove the complexity.

Installation

composer require moemengaballah/msegat

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel version less than 5.5:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

MoemenGaballah\Msegat\MsegatServiceProvider::class,

If you want to use the facade to log messages, add this to your facades in app.php:

'Msegat' => MoemenGaballah\Msegat\Msegat::class,

Copy the package config to your local config with the publish command:

php artisan vendor:publish --provider="msegat"

Usage

You must add first API Credentials in file env

MSEGAT_USERNAME=
MSEGAT_USER_SENDER=
MSEGAT_API_KEY=

Example

// numbers (required, string, international format without zeros separated by comma, example: "966xxxxxxxxx" or "966xxxxxxxxx,966xxxxxxxxx,966xxxxxxxxx")
//Msegat::sendMessage('numbers', 'MSG'); 
use Msegat;

$msg = Msegat::sendMessage('966xxxxxxxxx', 'رمز التحقق: 1234');

dd($msg);
// another example 
Route::get('/', function () {
    $msg = Msegat::sendMessage('966xxxxxxxxx', 'رمز التحقق: 1234');
    dd($msg);
});

if you don't have Credentials

This API is based on HTTPS protocol

You must have an account to test this API, to register please click here

You must use HTTPS POST with parameters in body [ VERY IMPORTANT ]

You must use URL ENCODING when you send the variables

If SMS is English only, we will charge 1 point for each 160 chars and if you send more than this, we will charge 1 point for each 153 chars

If SMS contains language other than English, we will charge 1 point for each 70 chars and if you send more than this, we will charge 1 point for each 67 chars

You can test our API for free . You will get free sms every day . To test our service you can send sms using below parameters:

userSender: OTP
msg: "Pin Code is: xxxx" or "Verification Code: xxxx"

status code and Messages

1 - Success

M0000 - Success

M0001 - Variables missing

M0002 - Invalid login info

M0022 - Exceed number of senders allowed

M0023 - Sender Name is active or under activation or refused

M0024 - Sender Name should be in English or number

M0025 - Invalid Sender Name Length

M0026 - Sender Name is already activated or not found

M0027 - Activation Code is not Correct

1010 - Variables missing

1020 - Invalid login info

1050 - MSG body is empty

1060 - Balance is not enough

1061 - MSG duplicated

1064 - Free OTP , Invalid MSG content you should use "Pin Code is: xxxx" or "Verification Code: xxxx" or "رمز التحقق: 1234" , or upgrade your account and activate your sender to send any content

1110 - Sender name is missing or incorrect

1120 - Mobile numbers is not correct

1140 - MSG length is too long

M0029 - Invalid Sender Name - Sender Name should contain only letters, numbers and the maximum length should be 11 characters

M0030 - Sender Name should ended with AD

M0031 - Maximum allowed size of uploaded file is 5 MB

M0032 - Only pdf,png,jpg and jpeg files are allowed!

M0033 - Sender Type should be normal or whitelist only

M0034 - Please Use POST Method

M0036 - There is no any sender
You might also like...
A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic

A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic! concepts like , Hijri Dates & Arabic strings and so on ..

A Laravel package that adds a simple image functionality to any Laravel model
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

laravel-vat is a package that contains the Laravel related wiring code for ibericode/vat

laravel-vat is a package that contains the Laravel related wiring code for ibericode/vat, helping you deal with VAT legislation for businesses based in the EU.

Laravel Backup Panel provides a dashboard for spatie/laravel-backup package.
Laravel Backup Panel provides a dashboard for spatie/laravel-backup package.

Laravel Backup Panel Laravel Backup Panel provides a dashboard for spatie/laravel-backup package. It lets you: create a backup (full | only database |

Laravel package to find performance bottlenecks in your laravel application.
Laravel package to find performance bottlenecks in your laravel application.

Laravel Meter Laravel Meter monitors application performance for different things such as requests, commands, queries, events, etc and presents result

Laravel 2-Step Verification is a package to add 2-Step user authentication to any Laravel project easily.
Laravel 2-Step Verification is a package to add 2-Step user authentication to any Laravel project easily.

Laravel 2-Step verification is a package to add 2-Step user authentication to any Laravel project easily. It is configurable and customizable. It uses notifications to send the user an email with a 4-digit verification code. Laravel 2-Step Authentication Verification for Laravel. Can be used in out the box with Laravel's authentication scaffolding or integrated into other projects.

This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.

Laravel FFMpeg This package provides an integration with FFmpeg for Laravel 6.0 and higher. Laravel's Filesystem handles the storage of the files. Lau

 Laravel Users | A Laravel Users CRUD Management Package
Laravel Users | A Laravel Users CRUD Management Package

A Users Management Package that includes all necessary routes, views, models, and controllers for a user management dashboard and associated pages for managing Laravels built in user scaffolding. Built for Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 6.0, 7.0 and 8.0.

Laravel-FCM is an easy to use package working with both Laravel and Lumen for sending push notification with Firebase Cloud Messaging (FCM).

Laravel-FCM Introduction Laravel-FCM is an easy to use package working with both Laravel and Lumen for sending push notification with Firebase Cloud M

Owner
Moemen Gaballah
PHP Developer
Moemen Gaballah
Easily add all the 58 Algerian Wilayas and its Dairas to your cool Laravel project (Migrations, Seeders and Models).

Laravel-Algereography Laravel-Algereography allows you to add Migrations, Seeders and Models of Algerian Wilayas and Dairas to your existing or new co

Hocine Saad 48 Nov 25, 2022
Jetstrap is a lightweight laravel 8 package that focuses on the VIEW side of Jetstream / Breeze package installed in your Laravel application

A Laravel 8 package to easily switch TailwindCSS resources generated by Laravel Jetstream and Breeze to Bootstrap 4.

null 686 Dec 28, 2022
A Laravel chat package. You can use this package to create a chat/messaging Laravel application.

Chat Create a Chat application for your multiple Models Table of Contents Click to expand Introduction Installation Usage Adding the ability to partic

Tinashe Musonza 931 Dec 24, 2022
This package provides extended support for our spatie/enum package in Laravel.

Laravel support for spatie/enum This package provides extended support for our spatie/enum package in Laravel. Installation You can install the packag

Spatie 264 Dec 23, 2022
Testbench Component is the de-facto package that has been designed to help you write tests for your Laravel package

Laravel Testing Helper for Packages Development Testbench Component is the de-facto package that has been designed to help you write tests for your La

Orchestra Platform 1.9k Dec 29, 2022
🥳🔐 This package is a Laravel package that checks if an email address is a spammer

This package is a Laravel package that checks if an email address is a spammer. It verifies your signups and form submissions to confirm that they are legitimate.

Endurance, the Martian 15 Dec 19, 2022
GeoLocation-Package - This package helps you to know the current language of the user, the country from which he is browsing, the currency of his country, and also whether he is using it vpn

GeoLocation in PHP (API) ?? ?? ?? This package helps you to know a lot of information about the current user by his ip address ?? ?? ?? This package h

Abdullah Karam 4 Dec 8, 2022
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

null 9 Dec 14, 2022
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Jan 2, 2023
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Ollie Codes 19 Jul 5, 2021