mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
29
app/Providers/AppServiceProvider.php
Normal file
29
app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Logger\RequestLogger;
|
||||
use Clue\React\Buzz\Browser;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use React\EventLoop\Factory as LoopFactory;
|
||||
use React\EventLoop\LoopInterface;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton(LoopInterface::class, function () {
|
||||
return LoopFactory::create();
|
||||
});
|
||||
|
||||
$this->app->singleton(RequestLogger::class, function () {
|
||||
$browser = new Browser(app(LoopInterface::class));
|
||||
return new RequestLogger($browser);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user