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
|
|
|
|
2024-09-23 01:53:46 +02:00
|
|
|
use Illuminate\Routing\Router;
|
2022-11-17 02:15:29 +01:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2024-09-23 01:53:46 +02:00
|
|
|
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()
|
|
|
|
{
|
2024-09-23 01:53:46 +02:00
|
|
|
app(Router::class)->middleware(['web', 'auth:web'])->group(function ($router) {
|
|
|
|
$router->get('/', DashboardIndexAction::class)->name('home');
|
|
|
|
});
|
2022-11-17 02:15:29 +01:00
|
|
|
}
|
|
|
|
}
|