diff --git a/app/Dashboard/DashboardServiceProvider.php b/app/Dashboard/DashboardServiceProvider.php index 3d573496..340aa208 100644 --- a/app/Dashboard/DashboardServiceProvider.php +++ b/app/Dashboard/DashboardServiceProvider.php @@ -2,7 +2,9 @@ namespace App\Dashboard; +use Illuminate\Routing\Router; use Illuminate\Support\ServiceProvider; +use App\Dashboard\Actions\IndexAction as DashboardIndexAction; class DashboardServiceProvider extends ServiceProvider { @@ -23,5 +25,8 @@ class DashboardServiceProvider extends ServiceProvider */ public function boot() { + app(Router::class)->middleware(['web', 'auth:web'])->group(function ($router) { + $router->get('/', DashboardIndexAction::class)->name('home'); + }); } } diff --git a/routes/web.php b/routes/web.php index 7996811b..a103aa71 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,7 +17,6 @@ use App\Course\Actions\CourseIndexAction; use App\Course\Actions\CourseStoreAction; use App\Invoice\Actions\InvoiceStoreAction; use App\Course\Actions\CourseUpdateAction; -use App\Dashboard\Actions\IndexAction as DashboardIndexAction; use App\Efz\ShowEfzDocumentAction; use App\Fileshare\Actions\FileshareApiIndexAction; use App\Fileshare\Actions\FileshareStoreAction; @@ -84,7 +83,6 @@ Route::group(['namespace' => 'App\\Http\\Controllers'], function (): void { }); Route::group(['middleware' => 'auth:web'], function (): void { - Route::get('/', DashboardIndexAction::class)->name('home'); Route::post('/nami/login-check', NamiLoginCheckAction::class)->name('nami.login-check'); Route::post('/nami/get-search-layer', NamiGetSearchLayerAction::class)->name('nami.get-search-layer'); Route::post('/nami/search', NamiSearchAction::class)->name('nami.search');