A full-lifecycle queue jobs watcher for Laravel 5.1+
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
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'));
}
}
laravel-qwatcher is released under the MIT License.