adrema/modules/Form/FormServiceProvider.php

40 lines
1011 B
PHP

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