2024-03-01 13:34:36 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2024-03-05 13:27:27 -06:00
|
|
|
use App\Repositories\PageRepository;
|
|
|
|
use App\Interfaces\PageRepositoryInterface;
|
2024-03-01 13:34:36 -06:00
|
|
|
use App\Services\SettingsService;
|
|
|
|
use App\Services\AuthService;
|
2024-03-03 17:49:05 -06:00
|
|
|
use App\Services\ContentService;
|
|
|
|
use App\Services\PaginateService;
|
2024-03-06 10:27:41 -06:00
|
|
|
use App\Services\ThemeService;
|
2024-03-08 14:09:43 -06:00
|
|
|
use App\Services\DocService;
|
2024-03-11 16:32:38 -06:00
|
|
|
use App\Services\FileUploadService;
|
2024-03-01 13:34:36 -06:00
|
|
|
|
|
|
|
class FipamoServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register services.
|
|
|
|
*/
|
|
|
|
public function register(): void
|
|
|
|
{
|
2024-03-05 13:27:27 -06:00
|
|
|
//services
|
2024-03-01 13:34:36 -06:00
|
|
|
$this->app->bind(SettingsService::class, function ($app) {
|
2024-03-12 16:16:36 -06:00
|
|
|
return new SettingsService(new DocService());
|
2024-03-01 13:34:36 -06:00
|
|
|
});
|
|
|
|
|
|
|
|
$this->app->bind(AuthService::class, function ($app) {
|
2024-03-12 16:16:36 -06:00
|
|
|
return new AuthService(new SettingsService(new DocService()));
|
2024-03-01 13:34:36 -06:00
|
|
|
});
|
2024-03-03 17:49:05 -06:00
|
|
|
|
|
|
|
$this->app->bind(ContentService::class, function ($app) {
|
|
|
|
return new ContentService();
|
|
|
|
});
|
|
|
|
|
2024-03-06 10:27:41 -06:00
|
|
|
$this->app->bind(ThemeService::class, function ($app) {
|
2024-03-12 16:16:36 -06:00
|
|
|
return new ThemeService(new SettingsService(new DocService()));
|
2024-03-06 10:27:41 -06:00
|
|
|
});
|
|
|
|
|
2024-03-03 17:49:05 -06:00
|
|
|
$this->app->bind(PaginateService::class, function ($app) {
|
|
|
|
return new PaginateService(new ContentService());
|
|
|
|
});
|
2024-03-08 14:09:43 -06:00
|
|
|
|
|
|
|
$this->app->bind(StringService::class, function ($app) {
|
|
|
|
return new StringService();
|
|
|
|
});
|
|
|
|
|
|
|
|
$this->app->bind(DocService::class, function ($app) {
|
|
|
|
return new DocService();
|
|
|
|
});
|
2024-03-11 16:32:38 -06:00
|
|
|
|
|
|
|
$this->app->bind(FileUploadService::class, function ($app) {
|
|
|
|
return new FileUploadService();
|
|
|
|
});
|
2024-03-01 13:34:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap services.
|
|
|
|
*/
|
|
|
|
public function boot(): void
|
|
|
|
{
|
2024-03-05 13:27:27 -06:00
|
|
|
$this->app->bind(PageRepositoryInterface::class, PageRepository::class);
|
2024-03-01 13:34:36 -06:00
|
|
|
}
|
|
|
|
}
|