2022-02-25 08:03:46 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
2022-03-25 17:02:09 -05:00
|
|
|
use App\Services\ProcessInput;
|
2022-02-25 08:03:46 -06:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2022-08-20 22:04:32 -05:00
|
|
|
use Illuminate\Contracts\Queue\Factory as QueueFactoryContract;
|
|
|
|
|
use App\Queue\DatabaseConnector;
|
2023-03-22 20:39:09 -05:00
|
|
|
use App\Services\Trakt;
|
2022-02-25 08:03:46 -06:00
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap any application services.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function boot()
|
|
|
|
|
{
|
2022-08-20 22:04:32 -05:00
|
|
|
$this->app[QueueFactoryContract::class]->extend('database', fn () => new DatabaseConnector($this->app['db']));
|
|
|
|
|
|
2022-02-25 08:03:46 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register any application services.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function register()
|
|
|
|
|
{
|
2022-03-25 17:02:09 -05:00
|
|
|
$this->app->instance(ProcessInput::class, new ProcessInput());
|
2023-03-22 20:39:09 -05:00
|
|
|
$this->app->instance(Trakt::class, new Trakt());
|
2022-02-25 08:03:46 -06:00
|
|
|
}
|
|
|
|
|
}
|