Laravel Voip Ms API Integration - the perfect wingman for your Laravel project to connect with your VoIP Ms crush!
Begin by installing this package through Composer. Run this command from the Terminal:
composer require sinarahmany/laravel-voipms
php artisan vendor:publish --provider="Sinarahmany\LaravelVoipMs\VoipMsServiceProvider"
To run this project, you will need to add the following environment variables to your .env file
VOIPMS_API_URL=https://voip.ms/api/v1/rest.php
VOIPMS_USERNAME={YOUR_USERNAME}
VOIPMS_PASSWORD={YOUR_PASSWORD}
VOIPMS_DID={YOUR_DID}
First, include the Facade class at the top of your file:
use Sinarahmany\LaravelVoipMs\VoipMs;
To send an SMS message to a destination number, use the sendSMS
method:
VoipMs::sendSMS($yourNumber, $yourText);
To send an MMS message to a destination number, use the sendMMS
method:
VoipMs::sendMMS($yourNumber, $yourText, $imageurl (optional));
// Note: $imageUrl is optional.
To retrieve a list of SMS messages by date range, SMS type, DID number, and contact, use the getSMS
method:
VoipMs::getSMS(['id' => $smsId, 'from' => $fromDate, 'to' => $toDate, 'type' => $smsType, 'contact' => $contactNumber, 'limit' => $limit]);
// Note: passed params are optional.
This is a development package and may be subject to frequent changes and updates as development continues. It is recommended that you regularly check for updates and incorporate any changes as needed.
Thank you for using this development package, and happy coding!
If you have any feedback, please reach out to us at sinarahmannejad.com.