v1.0.0 initial release
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Events;
|
||||
|
||||
use Illuminate\Contracts\Queue\Factory as QueueFactoryContract;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton('events', function ($app) {
|
||||
return (new Dispatcher($app))->setQueueResolver(function () use ($app) {
|
||||
return $app->make(QueueFactoryContract::class);
|
||||
})->setTransactionManagerResolver(function () use ($app) {
|
||||
return $app->bound('db.transactions')
|
||||
? $app->make('db.transactions')
|
||||
: null;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user