33 lines
		
	
	
		
			699 B
		
	
	
	
		
			PHP
		
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			699 B
		
	
	
	
		
			PHP
		
	
	
	
| <?php
 | |
| 
 | |
| namespace Modules\Dashboard;
 | |
| 
 | |
| use Illuminate\Routing\Router;
 | |
| use Illuminate\Support\ServiceProvider;
 | |
| use Modules\Dashboard\Components\DashboardComponent;
 | |
| 
 | |
| 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');
 | |
|         });
 | |
|     }
 | |
| }
 |