fipamo/app/Providers/FipamoServiceProvider.php
ro 0951005341
added settings page
it's time to get the setting api running so site options can be editied
so the first step is to get the settings page up and running.

the sorting class is getting a bit heavy, but it will hold the method
for gathering settings page info for now.
2024-03-19 13:19:27 -06:00

99 lines
2.9 KiB
PHP

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Repositories\PageRepository;
use App\Interfaces\PageRepositoryInterface;
use App\Services\SettingsService;
use App\Services\AuthService;
use App\Services\ContentService;
use App\Services\PaginateService;
use App\Services\ThemeService;
use App\Services\DocService;
use App\Services\StringService;
use App\Services\FileUploadService;
use App\Services\RenderService;
use App\Services\SortingService;
use App\Services\AssetService;
class FipamoServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
//services
$this->app->bind(SettingsService::class, function ($app) {
return new SettingsService(new DocService());
});
$this->app->bind(AuthService::class, function ($app) {
return new AuthService(new SettingsService(new DocService()));
});
$this->app->bind(ContentService::class, function ($app) {
return new ContentService();
});
$this->app->bind(ThemeService::class, function ($app) {
return new ThemeService(new SettingsService(new DocService()));
});
$this->app->bind(PaginateService::class, function ($app) {
return new PaginateService(new ContentService());
});
$this->app->bind(StringService::class, function ($app) {
return new StringService();
});
$this->app->bind(DocService::class, function ($app) {
return new DocService();
});
$this->app->bind(FileUploadService::class, function ($app) {
return new FileUploadService();
});
$this->app->bind(RenderService::class, function ($app) {
return new RenderService(
new SortingService(
new SettingsService(new DocService()),
new ContentService(),
new StringService(),
new ThemeService(new SettingsService(new DocService()))
),
new SettingsService(new DocService()),
new ContentService(),
);
});
$this->app->bind(SortingService::class, function ($app) {
return new SortingService(
new SettingsService(new DocService()),
new ContentService(),
new StringService(),
new ThemeService(new SettingsService(new DocService()))
);
});
$this->app->bind(AssetService::class, function ($app) {
return new AssetService(
new ThemeService(
new SettingsService(new DocService())
)
);
});
}
/**
* Bootstrap services.
*/
public function boot(): void
{
$this->app->bind(PageRepositoryInterface::class, PageRepository::class);
}
}