Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
UshurbakiyevDavlat committed Oct 14, 2023
1 parent 006dd58 commit a224309
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,21 @@
// Add a group for routes with URL prefix "admin"
// Assign middleware called "is_admin" to them
// Put one Route Group code line here below
Route::prefix('admin')->group(function () {

// Tasks inside that /admin group:

// Task 10: point URL /admin/dashboard to a "Single Action" Admin/DashboardController
// Put one code line here below
Route::get('dashboard', DashboardController::class)->name('dashboard');
// Task 11: point URL /admin/stats to a "Single Action" Admin/StatsController
// Put one code line here below
Route::get('stats', StatsController::class);
// End of the /admin Route Group
})->middleware('is_admin');
Route::group([
'middleware' => 'is_admin',
'prefix' => 'admin',
function () {
// Tasks inside that /admin group:

// Task 10: point URL /admin/dashboard to a "Single Action" Admin/DashboardController
// Put one code line here below
Route::get('dashboard', DashboardController::class)->name('dashboard');
// Task 11: point URL /admin/stats to a "Single Action" Admin/StatsController
// Put one code line here below
Route::get('stats', StatsController::class);
// End of the /admin Route Group
},
]);
// End of the main Authenticated Route Group
});
// One more task is in routes/api.php
Expand Down

0 comments on commit a224309

Please sign in to comment.