PHP code example of reedtechus / azure-service-bus-laravel

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

    

reedtechus / azure-service-bus-laravel example snippets


return [
	'tenant' => env('SERVICE_BUS_TENANT'),
	'namespace' => env('SERVICE_BUS_NAMESPACE'),
	'cache_driver' => env('SERVICE_BUS_CACHE_DRIVER', 'redis'),
];

AzureServiceBus::send('queue_or_topic_name', ['payload_data' => 'goes_here'])

AzureServiceBus::peek('queue_name')

AzureServiceBus::peek('queue_name', 'subscription_name')

AzureServiceBus::pop('queue_name')

AzureServiceBus::pop('queue_name', 'subscription_name')
bash
php artisan vendor:publish --tag="azure-service-bus-laravel-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="azure-service-bus-laravel-config"
bash
php artisan vendor:publish --tag="azure-service-bus-laravel-views"