33 lines
752 B
PHP
33 lines
752 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
// Register GutendexClient as a singleton
|
|
$this->app->singleton(\App\Services\GutendexClient::class, function ($app) {
|
|
return new \App\Services\GutendexClient();
|
|
});
|
|
|
|
// Register OllamaService as a singleton
|
|
$this->app->singleton(\App\Services\OllamaService::class, function ($app) {
|
|
return new \App\Services\OllamaService();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
}
|