adrema/modules/Form/FormServiceProvider.php

40 lines
1011 B
PHP
Raw Normal View History

2024-12-20 00:04:39 +01:00
<?php
namespace Modules\Form;
use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
2024-12-22 18:34:00 +01:00
use Modules\Form\Components\FormSettingView;
2024-12-20 00:04:39 +01:00
use App\Setting\SettingFactory;
use App\Form\FormSettings;
2024-12-22 18:34:00 +01:00
use App\Prevention\PreventionSettings;
use Modules\Form\Components\PreventionSettingView;
2024-12-20 00:04:39 +01:00
class FormServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
app(SettingFactory::class)->register(FormSettings::class);
2024-12-22 18:34:00 +01:00
app(SettingFactory::class)->register(PreventionSettings::class);
2024-12-20 00:04:39 +01:00
app(Router::class)->middleware(['web', 'auth:web'])->group(function ($router) {
2024-12-22 18:34:00 +01:00
$router->get('/setting/form', FormSettingView::class)->name('setting.form');
$router->get('/setting/prevention', PreventionSettingView::class)->name('setting.prevention');
2024-12-20 00:04:39 +01:00
});
}
}