2026-07-18 14:35:53 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
2026-08-06 20:47:06 +03:00
|
|
|
use App\Support\AiProviders\AiProviderManager;
|
|
|
|
|
use App\Support\AiProviders\ElevenLabsDriver;
|
|
|
|
|
use App\Support\AiProviders\OpenAiDriver;
|
|
|
|
|
use App\Support\AiProviders\StabilityAiDriver;
|
2026-07-27 21:08:39 +03:00
|
|
|
use App\Support\Publishing\LinkedInPublisher;
|
2026-07-21 14:04:45 +03:00
|
|
|
use App\Support\Publishing\PublisherManager;
|
|
|
|
|
use App\Support\Publishing\RedditPublisher;
|
2026-07-27 21:08:39 +03:00
|
|
|
use App\Support\Publishing\TwitterPublisher;
|
2026-07-21 14:04:45 +03:00
|
|
|
use App\Support\Publishing\WordPressPublisher;
|
2026-07-18 14:35:53 +03:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Register any application services.
|
|
|
|
|
*/
|
|
|
|
|
public function register(): void
|
|
|
|
|
{
|
2026-07-21 14:04:45 +03:00
|
|
|
$this->app->singleton(PublisherManager::class, fn ($app) => new PublisherManager([
|
|
|
|
|
$app->make(WordPressPublisher::class),
|
|
|
|
|
$app->make(RedditPublisher::class),
|
2026-07-27 21:08:39 +03:00
|
|
|
$app->make(TwitterPublisher::class),
|
|
|
|
|
$app->make(LinkedInPublisher::class),
|
2026-07-21 14:04:45 +03:00
|
|
|
]));
|
2026-08-06 20:47:06 +03:00
|
|
|
|
|
|
|
|
$this->app->singleton(AiProviderManager::class, fn ($app) => new AiProviderManager([
|
|
|
|
|
'openai' => $app->make(OpenAiDriver::class),
|
|
|
|
|
'stability_ai' => $app->make(StabilityAiDriver::class),
|
|
|
|
|
'elevenlabs' => $app->make(ElevenLabsDriver::class),
|
|
|
|
|
]));
|
2026-07-18 14:35:53 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap any application services.
|
|
|
|
|
*/
|
|
|
|
|
public function boot(): void
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
}
|