PHP code example of megoxv / zeromsg

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

    

megoxv / zeromsg example snippets


use Megoxv\ZeroMsg\Facades\ZeroMsg;

ZeroMsg::create()
    ->message('Hello, this is a test message')
    ->to('34676010101')
    ->send();

use Megoxv\ZeroMsg\Facades\ZeroMsg;

ZeroMsg::create()
    ->message('Check out this image!')
    ->image('https://example.com/image.jpg', 'image.jpg')
    ->to('34676010101')
    ->send();

use Megoxv\ZeroMsg\Facades\ZeroMsg;

ZeroMsg::create()
    ->voice('https://example.com/voice.mp3')
    ->to('34676010101')
    ->send();

use Megoxv\ZeroMsg\Facades\ZeroMsg;

ZeroMsg::create()
    ->message('Check out this media file!')
    ->media('https://example.com/media.mp4', 'media.mp4')
    ->to('34676010101')
    ->send();

use Megoxv\ZeroMsg\Facades\ZeroMsg;

ZeroMsg::create()
    ->message('Check out this list!')
    ->listMessage(
        'Options',
        'Select',
        [
            [
                'title' => 'Section 1',
                'value' => 'option1',
                'description' => 'First option'
            ],
            [
                'title' => 'Section 2',
                'value' => 'option2',
                'description' => 'Second option'
            ]
        ]
    )
    ->to('34676010101')
    ->send();

use Megoxv\ZeroMsg\Facades\ZeroMsg;

ZeroMsg::create()
    ->message('Check out this link!')
    ->linkPreview('https://zeromsg.com')
    ->to('34676010101')
    ->send();

use Megoxv\ZeroMsg\Facades\ZeroMsg;

ZeroMsg::create()
    ->location('37.7749', '-122.4194', 'San Francisco', 'California, USA')
    ->to('34676010101')
    ->send();
bash
php artisan vendor:publish --tag="zeromsg-config"