Download the PHP package hooman-mirghasemi/laravel-iran-sms without Composer

On this page you can find all versions of the php package hooman-mirghasemi/laravel-iran-sms. 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-iran-sms

Laravel Iran Sms

Latest Version on Packagist Total Downloads on Packagist StyleCI Maintainability Quality Score

This is a Laravel Package for Sms Senders Integration. This package supports Laravel 8+, all tests passed for laravel 8, 9, 10 and 11!

Benefits of this package:

  • Multiple drivers
  • Support create custom drivers
  • Have Fake build in driver, it can send success or failure sms/voice call message. (Can use in development and testing modes)
  • Store sms reports in database
  • Have a tools in only development mode in http://localhost/sms/get-sms-list (Your frontend developer can use it for access latest sms send with fake driver for example needs to otp codes, when he/she is developing some parts like forgot password)

List of contents

List of available drivers

Note: for using each of them check config file and use the needed env in your env file like username/password or api key depend on witch driver you use.

Note: to use magfa/sms online/avanak you should install php ext-soap.

.env file for each driver:

fake sms sender

// Use in your local .env file

SMS_DRIVER=fake

// It's optional if you want you can set a number

FAKE_SENDER_NUMBER=101010

Kavenegar

// Use in your production .env file if you want to use Kavenegar as default sms driver

SMS_DRIVER=kavenegar

// Your kavenegar account api key

KAVENEGAR_API_KEY=fsdf452fd

Magfa

// Use in your production .env file if you want to use Magfa as default sms driver

SMS_DRIVER=magfa

SMS_MAGFA_USERNAME=your magfa user name

SMS_MAGFA_PASSWORD=your magfa password

SMS_MAGFA_DOMAIN=your magfa domain

SMS_MAGFA_SENDER_NUMBER=your number in magfa you want to send sms with it

Sms Online

// Use in your production .env file if you want to use Sms Online as default sms driver

SMS_DRIVER=smsonline

SMS_ONLINE_USERNAME=your smsonline user name

SMS_ONLINE_PASSWORD=your smsonline password

SMS_ONLINE_SENDER_NUMBER=your number in smsonline you want to send sms with it

Avanak (voice caller)

// Use in your production .env file if you want to use Sms Online as default sms driver

VOICE_CALL_DRIVER=avanak

VOICE_AVANAK_USERNAME=your avanak user name

VOICE_AVANAK_PASSWORD=your avanak password

you can create your own custom drivers if it does not exist in the list, read the Create custom drivers section.

Install

Via Composer

Publish Vendor Files

It is optional and only if you need you can publish vendor files by these commands:

.env file

You can use SMS_DRIVER env for set default sms driver. (in local don't change it, by default it set fake driver)

And also can use VOICE_CALL_DRIVER env. it is like SMS_DRIVER, but for voice call.

How to use

There are two option of using this package:

1- use Facades

2- use Channels

Working with Facades

You can use Sms or VoiceCall facades in anywhere of your code like this:

available methods:

Working with Channels (use laravel notification classes)

Make a laravel notification class, set via SmsChannel like this code:

Change condition of showing sms list page

By default when your laravel application is in production mode this page will response

  1. But if you want have a diffrent condition publish config file and change this part like this code or some thing you want:

now if you forgot to set app.env to production or temporary change it, it will be safe and return 404.

Create custom drivers:

Option A:

We welcome your participation, Create your driver and send a pull request.

Option A: This package is using strategy design pattern and laravel Manager class. so you can easily make your driver like this:

And register it into manager class in any of your service providers class like this:

Events

You can listen for this event

Contributing

Please see CONDUCT for details.

Credits

License

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


All versions of laravel-iran-sms with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
kavenegar/laravel Version *
laravel/framework Version ^8.0|^9.0|^10.0|^11.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 hooman-mirghasemi/laravel-iran-sms contains the following files

Loading the files please wait ....