for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Wanghanlin\QueuePool;
use Illuminate\Support\ServiceProvider;
class QueuePoolServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*/
public function boot()
$this->app->singleton('queue.pool', function () {
return new QueuePool($this->app->basePath());
});
$this->app->singleton('command.queue.pool', function ($app) {
return new QueuePoolCommand($app['queue.pool']);
if ($this->app->runningInConsole()) {
$this->commands([
'command.queue.pool',
]);
}
* Register the application services.
public function register()
//
* Get the services provided by the provider.
*
* @return array
public function provides()
return [
'queue.pool', 'command.queue.pool',
];