adrema/modules/Dashboard/DashboardServiceProvider.php

44 lines
1.2 KiB
PHP
Raw Normal View History

2024-09-24 01:26:08 +02:00
<?php
namespace Modules\Dashboard;
use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
use Modules\Dashboard\Components\DashboardComponent;
2024-10-14 21:29:33 +02:00
use Modules\Invoice\MemberPaymentBlock;
use Modules\Member\AgeGroupCountBlock;
use Modules\Member\TestersBlock;
use Modules\Prevention\EfzPendingBlock;
use Modules\Prevention\PsPendingBlock;
2024-09-24 01:26:08 +02:00
class DashboardServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
app()->singleton(DashboardFactory::class, fn () => new DashboardFactory());
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
app(Router::class)->middleware(['web', 'auth:web'])->group(function ($router) {
$router->get('/', DashboardComponent::class)->name('home');
});
2024-10-14 21:29:33 +02:00
app(DashboardFactory::class)->register(AgeGroupCountBlock::class);
app(DashboardFactory::class)->register(MemberPaymentBlock::class);
app(DashboardFactory::class)->register(TestersBlock::class);
app(DashboardFactory::class)->register(EfzPendingBlock::class);
app(DashboardFactory::class)->register(PsPendingBlock::class);
2024-09-24 01:26:08 +02:00
}
}