Skip to content

Commit f8bc513

Browse files
authored
Merge pull request #137 from php-enqueue/laravel-queue
Laravel queue package
2 parents b7a9979 + 5138c53 commit f8bc513

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Features:
2222
* [Null](docs/transport/null.md).
2323
* [Symfony bundle](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/bundle/quick_tour.md)
2424
* [Magento1 extension](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/magento/quick_tour.md)
25+
* [Laravel extension](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/laravel/quick_tour.md)
2526
* [Message bus](http://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageBus.html) support.
2627
* [RPC over MQ](https://www.rabbitmq.com/tutorials/tutorial-one-php.html) support.
2728
* Temporary queues support.

Diff for: docs/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
- [Functional testing](bundle/functional_testing.md)
3939
* Async event dispatcher (Symfony)
4040
- [Quick tour](async_event_dispatcher/quick_tour.md)
41+
* Laravel
42+
- [Quick tour](laravel/quick_tour.md)
4143
* Magento
4244
- [Quick tour](magento/quick_tour.md)
4345
- [Cli commands](magento/cli_commands.md)

Diff for: docs/laravel/quick_tour.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Laravel Queue. Quick tour.
2+
3+
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).
4+
5+
## Install
6+
7+
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).
8+
9+
```bash
10+
$ composer require enqueue/larvel-queue enqueue/fs
11+
```
12+
13+
## Register service provider
14+
15+
```php
16+
<?php
17+
18+
// config/app.php
19+
20+
return [
21+
'providers' => [
22+
Enqueue\LaravelQueue\EnqueueServiceProvider::class,
23+
],
24+
];
25+
```
26+
27+
## Configure
28+
29+
First, you have to configure a transport layer and set one to be default.
30+
31+
```php
32+
<?php
33+
34+
// config/queue.php
35+
36+
return [
37+
'connections' => [
38+
'interop' => [
39+
'driver' => 'interop',
40+
'connection_factory_class' => \Enqueue\Fs\FsConnectionFactory::class,
41+
42+
// the factory specific options
43+
'dsn' => 'file://'.realpath(__DIR__.'/../storage').'/enqueue',
44+
],
45+
],
46+
];
47+
```
48+
49+
## Usage
50+
51+
Same as standard [Laravel Queues](https://laravel.com/docs/5.4/queues)
52+
53+
[back to index](../index.md)

0 commit comments

Comments
 (0)