maqe / laravel-qwatcher
A full-lifecycle queue jobs watcher for Laravel 5.1+
dev-master
2016-12-09 12:43 UTC
Requires
- php: >=5.5.9
- illuminate/bus: ~5.1
- illuminate/database: ~5.1
- illuminate/queue: ~5.1
- illuminate/support: ~5.1
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-11-07 09:56:38 UTC
README
A full-lifecycle queue jobs watcher for Laravel 5.1+
Installation
Add package dependency to your project's composer.json
file:
"require": { "maqe/laravel-qwatcher": "dev-master" }
Run composer update:
composer update maqe/laravel-qwatcher
Add package's service provider to your project's config/app.php
:
'providers' => array( Maqe\Qwatcher\QwatcherServiceProvider::class, ),
Add package's class aliases to your project's config/app.php
:
'aliases' => array( 'Qwatcher' => Maqe\Qwatcher\Facades\Qwatch::class, ),
You can publish the migration with:
php artisan vendor:publish --provider="Maqe\Qwatcher\QwatcherServiceProvider" --tag="migrations"
After the migration has been published you can create the media-table by running the migrations:
php artisan migrate
Usage
In your PHP project
Once Qwatcher is included in your project you may add it to any class by simply using the trait.
For example:
use Maqe\Qwatcher\Traits\WatchableDispatchesJobs; class Example { use WatchableDispatchesJobs; public function someMethod() { // WatchableDispatchesJobs trait allowed you to add additional info as an optional $this->dispatch(new Jobs(), array('key_addition_info1' => 'value_addition_info1')); } }
License
laravel-qwatcher is released under the MIT License.