adrema/app/Setting/SettingServiceProvider.php

41 lines
1.1 KiB
PHP
Raw Normal View History

2022-10-20 02:15:28 +02:00
<?php
namespace App\Setting;
2024-10-14 20:25:11 +02:00
use Modules\Module\ModuleSettings;
2024-07-04 21:01:14 +02:00
use App\Prevention\PreventionSettings;
2024-10-14 21:21:19 +02:00
use App\Setting\Data\SettingSynthesizer;
2024-08-01 11:17:49 +02:00
use Illuminate\Routing\Router;
2022-10-20 02:15:28 +02:00
use Illuminate\Support\ServiceProvider;
2024-10-14 21:21:19 +02:00
use Livewire\Livewire;
use Modules\Invoice\InvoiceSettings;
2022-10-20 02:15:28 +02:00
class SettingServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
app()->singleton(SettingFactory::class, fn () => new SettingFactory());
2024-08-01 11:17:49 +02:00
app(Router::class)->bind('settingGroup', fn ($param) => app(SettingFactory::class)->resolveGroupName($param));
2022-10-20 02:15:28 +02:00
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
2023-11-16 10:52:57 +01:00
app(SettingFactory::class)->register(ModuleSettings::class);
2023-04-18 22:08:45 +02:00
app(SettingFactory::class)->register(InvoiceSettings::class);
2023-10-31 00:11:32 +01:00
app(SettingFactory::class)->register(NamiSettings::class);
2024-07-04 21:01:14 +02:00
app(SettingFactory::class)->register(PreventionSettings::class);
2024-10-14 21:21:19 +02:00
Livewire::propertySynthesizer(SettingSynthesizer::class);
2022-10-20 02:15:28 +02:00
}
}