adrema/app/Dashboard/DashboardServiceProvider.php

33 lines
707 B
PHP
Raw Normal View History

2022-11-17 02:15:29 +01:00
<?php
2023-04-29 21:30:41 +02:00
namespace App\Dashboard;
2022-11-17 02:15:29 +01:00
use Illuminate\Routing\Router;
2022-11-17 02:15:29 +01:00
use Illuminate\Support\ServiceProvider;
use App\Dashboard\Actions\IndexAction as DashboardIndexAction;
2022-11-17 02:15:29 +01:00
2023-04-29 21:30:41 +02:00
class DashboardServiceProvider extends ServiceProvider
2022-11-17 02:15:29 +01:00
{
/**
* 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('/', DashboardIndexAction::class)->name('home');
});
2022-11-17 02:15:29 +01:00
}
}