Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ composer update
```

## Configuration
Add the ServiceProvider to your `providers` array in `app/config/app.php`:
Add the ServiceProvider to your `providers` array in `config/app.php`:

'Squigg\AzureQueueLaravel\AzureQueueServiceProvider',

add the following to the `connection` array in `app/config/queue.php`, set your `default` connection to `azure` and
add the following to the `connection` array in `config/queue.php`, set your `default` connection to `azure` and
fill out your own connection data from the Azure Management portal:

'azure' => [
Expand Down
19 changes: 9 additions & 10 deletions src/AzureQueueServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
namespace Squigg\AzureQueueLaravel;

use Illuminate\Queue\QueueManager;
use Illuminate\Support\ServiceProvider;

class AzureQueueServiceProvider extends \Illuminate\Support\ServiceProvider
class AzureQueueServiceProvider extends ServiceProvider
{

/**
* Register the service provider.
* Bootstrap any application services.
*
* @return void
*/
public function register()
public function boot()
{
$this->app->booted(function () {
/** @var QueueManager $manager */
$manager = $this->app['queue'];

/** @var QueueManager $manager */
$manager = $this->app['queue'];

$manager->addConnector('azure', function () {
return new AzureConnector;
});
$manager->addConnector('azure', function () {
return new AzureConnector;
});
}

}