PHP code example of ristekusdi / mca-kubemq-laravel

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

    

ristekusdi / mca-kubemq-laravel example snippets





use Illuminate\Support\Facades\Route;
use Ristekusdi\McaKubemqLaravel\Facades\Messagemcakube;

Route::get('/', function () {
    return view('welcome');
});

Route::get('/send-message', function () {

   Messagemcakube::sendMessage(32018000182, 'ristek usdi');
    return view('welcome');
});




use Illuminate\Support\Facades\Route;
use Ristekusdi\McaKubemqLaravel\Facades\Messagemcakube;

Route::get('/', function () {
    return view('welcome');
});

Route::get('/send-message', function () {

    $debug =  Messagemcakube::sendMessage(32018000182, 'ristek usdi', true);
    echo $debug;
    return view('welcome');
});



use Illuminate\Support\Facades\Route;
use Ristekusdi\McaKubemqLaravel\Facades\Messagemcakube;

Route::get('/', function () {
    return view('welcome');
});

Route::get('/send-message', function () {

 $message = '[SIRAISA]
    Ada surat masuk dari Rektor
    DETAIL SURAT 
    <strong>Perihal:</strong> 
            BERITA ACARA SERAH TERIMA BARANG MILIK NEGARA KONOHA
    <strong>Sifat surat:</strong> Biasa
            
    <strong>Tgl. Surat:</strong> 09-11-2020
    <strong>LAMPIRAN FILE</strong> 
    <a href="https://siraisa.unud.ac.id/uploads/surat-keluar/example.pdf">B_UN14_PL_2020_1607569648</a>';


    Messagemcakube::sendMessage(32018000182, $message);
    return view('welcome');
});

    /*
    * Package Service Providers...
    */
    Ristekusdi\McaKubemqLaravel\McaKubemqLaravelServiceProvider::class,
    /*
bash
php artisan vendor:publish --tag=config-mca-kubemq

'Messagemcakube' => \Ristekusdi\McaKubemqLaravel\Facades\Messagemcakube::class,
mcakubemqphp.php


return array(
    'address' => env('MCAKUBEMQ_ADDRESS', '172.0.0.1'),
    'port' => env('MCAKUBEMQ_PORT', '172.0.0.1'),
    'clientid' => env('MCAKUBEMQ_CLIENTID', 'default'),
    'channel' => env('MCAKUBEMQ_CHANNEL', 'default'),
);

php artisan cache:clear
php artisan config:clear
composer dump-autoload