PHP code example of melipayamak / laravel

1. Go to this page and download the library: Download melipayamak/laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

melipayamak / laravel example snippets


composer 

'providers' => [
  ...
  Melipayamak\Laravel\ServiceProvider::class,
],


'aliases' => [
  ...
  Melipayamak\Laravel\Facade::class,
],

use Melipayamak;
try{

    $sms = Melipayamak::sms();
    $to = '09123456789';
    $from = '5000...';
    $text = 'تست وب سرویس ملی پیامک';
    $response = $sms->send($to,$from,$text);
    $json = json_decode($response);
    echo $json->Value; //RecId or Error Number 
}catch(Exception $e){
    echo $e->getMessage();
}

// وب سرویس پیامک
$smsRest = Melipayamak::sms();
$smsSoap = Melipayamak::sms('soap');
// وب سرویس تیکت پشتیبانی
$ticket = Melipayamak::ticket();
// وب سرویس برای مدیریت کامل  ارسال انبوه پیامک
$branch = Melipayamak::branch();
//وب سرویس کاربران
$users = Melipayamak::users();
//وب سرویس دفترچه تلفن
$contacts = Melipayamak::contacts()


php artisan vendor:publish --tag="melipayamak"