Package Data | |
---|---|
Maintainer Username: | squigg |
Maintainer Contact: | github@squigg.co.uk (Steve Strugnell) |
Package Create Date: | 2016-10-08 |
Package Last Update: | 2024-03-30 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-09 03:01:28 |
Package Statistics | |
---|---|
Total Downloads: | 152,863 |
Monthly Downloads: | 5,661 |
Daily Downloads: | 241 |
Total Stars: | 43 |
Total Watchers: | 5 |
Total Forks: | 24 |
Total Open Issues: | 3 |
PHP Laravel 5 Queue Driver package to support Microsoft Azure Storage Queues
You can find this library on Packagist.
Require this package in your composer.json
. The version numbers will follow Laravel.
"squigg/azure-queue-laravel": "5.2.*"
composer require squigg/azure-queue-laravel:5.2.*
"squigg/azure-queue-laravel": "5.3.*"
composer require squigg/azure-queue-laravel:5.3.*
"squigg/azure-queue-laravel": "5.4.*"
composer require squigg/azure-queue-laravel:5.4.*
"squigg/azure-queue-laravel": "5.5.*"
composer require squigg/azure-queue-laravel:5.5.*
"squigg/azure-queue-laravel": "5.6.*"
composer require squigg/azure-queue-laravel:5.6.*
"squigg/azure-queue-laravel": "5.7.*"
composer require squigg/azure-queue-laravel:5.7.*
Add the following pear repository in your composer.json
file required for the Microsoft Azure SDK
(v5.4+ uses the microsoft/azure-storage
package instead, and v5.6+ uses microsoft/azure-storage-queue
):
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
Update Composer dependencies
composer update
If you are not using Laravel auto package discovery, add the ServiceProvider to your providers
array in config/app.php
:
'Squigg\AzureQueueLaravel\AzureQueueServiceProvider',
For Lumen (5.x) you will need to add the provider to bootstrap/app.php
:
$app->register(Squigg\AzureQueueLaravel\AzureQueueServiceProvider::class);
Add the following to the connections
array in config/queue.php
, and
fill out your own connection data from the Azure Management portal:
'azure' => [
'driver' => 'azure', // Leave this as-is
'protocol' => 'https', // https or http
'accountname' => env('AZURE_QUEUE_STORAGE_NAME'), // Azure storage account name
'key' => env('AZURE_QUEUE_KEY'), // Access key for storage account
'queue' => env('AZURE_QUEUE_NAME'), // Queue container name
'timeout' => 60 // Seconds before a job is released back to the queue
'endpoint' => env('AZURE_QUEUE_ENDPOINTSUFFIX'), // Optional endpoint suffix if different from core.windows.net
],
Add environment variables into your .env
file to set the above configuration parameters if you prefer:
AZURE_QUEUE_STORAGE_NAME=xxx
AZURE_QUEUE_KEY=xxx
AZURE_QUEUE_NAME=xxx
AZURE_QUEUE_ENDPOINTSUFFIX=xxx
Update the default queue used by Laravel by setting the QUEUE_DRIVER
value in your .env
file to azure
.
QUEUE_DRIVER=azure
Use the normal Laravel Queue functionality as per the documentation.
Remember to update the default queue by setting the QUEUE_DRIVER
value in your .env
file to azure
.
2018-09-04 - V5.7 - Support for Laravel 5.7 (composer dependency changes only)
2018-02-07 - V5.6 - Switch to GA version of Microsoft Azure Storage PHP API. Support Laravel 5.6 (composer.json changes only). Update dev dependencies to latest versions.
2017-09-11 - V5.5 - Support Laravel 5.5 and PHP7+ only. Update Azure Storage API to 0.18
2017-09-11 - V5.4 - Update Azure Storage API to 0.15 (no breaking changes)
Released under the MIT License. Based on Alex Bouma's Laravel 4 package, updated for Laravel 5.