PHP code example of ghasedak / laravel

1. Go to this page and download the library: Download ghasedak/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/ */

    

ghasedak / laravel example snippets


composer 

composer update 

GHASEDAKAPI_KEY=your_api_key

use Ghasedak\Laravel\GhasedakFacade;

$response = GhasedakFacade::SendSimple($receptor, $message, $lineNumber = null, $sendDate = null, $checkId = null);

$response = Ghasedak\Laravel\GhasedakFacade::SendSimple($receptor, $message, $lineNumber = null, $sendDate = null, $checkId = null);

$receptor = '09xxxxxxxxx';
$message = 'Hello, World!';
$lineNumber = '3000xxxxx'; 

$response = Ghasedak\Laravel\GhasedakFacade::SendSimple($receptor, $message, $lineNumber);


$response = Ghasedak\Laravel\GhasedakFacade::setVerifyType(Ghasedak\Laravel\GhasedakFacade::VERIFY_MESSAGE_TEXT)
->Verify(
    "09xxxxxxxxx",  // receptor  
    "my-template",  // name of the template which you've created in you account  
    "param1",       // parameters (supporting up to 10 parameters)   
    "param2",   
    "param3"
);  
 

$receptor = "09xxxxxxxxx";
$type = Ghasedak\Laravel\GhasedakFacade::VERIFY_MESSAGE_TEXT;
$template = "my-template";
$param1 = '123456';

$response = Ghasedak\Laravel\GhasedakFacade::setVerifyType($type)->Verify($receptor, $template, $param1);


"ghasedak/laravel": "*"

composer update 

GHASEDAKAPI_KEY=your_api_key

use Ghasedak\Laravel\GhasedakFacade;

$response = GhasedakFacade::SendSimple($receptor, $message, $lineNumber = null, $sendDate = null, $checkId = null);

$response = Ghasedak\Laravel\GhasedakFacade::SendSimple($receptor, $message, $lineNumber = null, $sendDate = null, $checkId = null);

$receptor = '09xxxxxxxxx';
$message = 'Hello, World!';
$lineNumber = '3000xxxxx';

$response = Ghasedak\Laravel\GhasedakFacade::SendSimple($receptor, $message, $lineNumber);
 
$response = Ghasedak\Laravel\GhasedakFacade::setVerifyType(Ghasedak\Laravel\GhasedakFacade::VERIFY_MESSAGE_TEXT)
->Verify(   
    "09xxxxxxxxx", // receptor 
    "my-template", // name of the template which you've created in you account   
    "param1",      // parameters (supporting up to 10 parameters)   
    "param2",   
    "param3"
);  
 

$receptor = "09xxxxxxxxx";
$type = Ghasedak\Laravel\GhasedakFacade::VERIFY_MESSAGE_TEXT;
$template = "my-template";
$param1 = '123456';

$response = Ghasedak\Laravel\GhasedakFacade::setVerifyType($type)->Verify($receptor, $template, $param1);