Skip to content

Commit

Permalink
Merge pull request #137 from php-enqueue/laravel-queue
Browse files Browse the repository at this point in the history
Laravel queue package
  • Loading branch information
makasim authored Jul 20, 2017
2 parents 9a59333 + 2acc301 commit 6b07486
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Features:
* [Null](docs/transport/null.md).
* [Symfony bundle](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/bundle/quick_tour.md)
* [Magento1 extension](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/magento/quick_tour.md)
* [Laravel extension](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/laravel/quick_tour.md)
* [Message bus](http://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageBus.html) support.
* [RPC over MQ](https://www.rabbitmq.com/tutorials/tutorial-one-php.html) support.
* Temporary queues support.
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
- [Functional testing](bundle/functional_testing.md)
* Async event dispatcher (Symfony)
- [Quick tour](async_event_dispatcher/quick_tour.md)
* Laravel
- [Quick tour](laravel/quick_tour.md)
* Magento
- [Quick tour](magento/quick_tour.md)
- [Cli commands](magento/cli_commands.md)
Expand Down
53 changes: 53 additions & 0 deletions docs/laravel/quick_tour.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Laravel Queue. Quick tour.

The [LaravelQueue](https://github.com/php-enqueue/laravel-queue) allows to use [queue-interop](https://github.com/queue-interop/queue-interop) compatible transports as [Laravel Queue](https://laravel.com/docs/5.4/queues).

## Install

You have to install `enqueue/laravel-queue` packages and one of the [supported transports](https://github.com/php-enqueue/enqueue-dev/tree/master/docs/transport).

```bash
$ composer require enqueue/larvel-queue enqueue/fs
```

## Register service provider

```php
<?php

// config/app.php

return [
'providers' => [
Enqueue\LaravelQueue\EnqueueServiceProvider::class,
],
];
```

## Configure

First, you have to configure a transport layer and set one to be default.

```php
<?php

// config/queue.php

return [
'connections' => [
'interop' => [
'driver' => 'interop',
'connection_factory_class' => \Enqueue\Fs\FsConnectionFactory::class,

// the factory specific options
'dsn' => 'file://'.realpath(__DIR__.'/../storage').'/enqueue',
],
],
];
```

## Usage

Same as standard [Laravel Queues](https://laravel.com/docs/5.4/queues)

[back to index](../index.md)

0 comments on commit 6b07486

Please sign in to comment.