adrema/modules/Mailgateway/MailgatewayServiceProvider.php

45 lines
1.0 KiB
PHP
Raw Permalink Normal View History

2024-10-20 21:19:07 +02:00
<?php
namespace Modules\Mailgateway;
use App\Setting\SettingFactory;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use Modules\Mailgateway\Components\SettingView;
2024-10-24 23:24:21 +02:00
use Modules\Mailgateway\Types\LocalType;
use Modules\Mailgateway\Types\MailmanType;
2024-10-20 21:19:07 +02:00
class MailgatewayServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
app(SettingFactory::class)->register(MailgatewaySettings::class);
app(Router::class)->middleware(['web', 'auth:web'])->group(function ($router) {
$router->get('/setting/mailgateway', SettingView::class)->name('setting.mailgateway');
});
2024-10-24 23:24:21 +02:00
app()->bind('mail-gateways', fn () => collect([
LocalType::class,
MailmanType::class,
]));
2024-10-20 21:19:07 +02:00
View::addNamespace('mailgateway', __DIR__ . '/Components');
}
}