-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from php-enqueue/laravel-queue
Laravel queue package
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |