Skip to content

Commit

Permalink
Complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Bimaekap committed Sep 21, 2023
1 parent 43759ee commit 2702889
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use App\Http\Controllers\Admin\DashboardController;
use App\Http\Controllers\Auth\AuthenticatedSessionController;
use App\Http\Controllers\DashboardController as ControllersDashboardController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\TaskController;
use App\Http\Controllers\UserController;
Expand Down Expand Up @@ -49,33 +50,33 @@
Route::group(['middleware' => 'auth'], function () {
// Tasks inside that Authenticated group:

Route::get('/auth/create' , [AuthenticatedSessionController::class, 'create']);
Route::get('/auth/store' , [AuthenticatedSessionController::class, 'store']);
Route::get('/auth/destroy' , [AuthenticatedSessionController::class, 'destroy']);

Route::get('/auth/create', [AuthenticatedSessionController::class, 'create']);
Route::get('/auth/store', [AuthenticatedSessionController::class, 'store']);
Route::get('/auth/destroy', [AuthenticatedSessionController::class, 'destroy']);
});

// Task 6: /app group within a group
// Add another group for routes with prefix "app"
// Put one Route Group code line here below

Route::prefix('/app')->group(function () {
// Tasks inside that /app group:
Route::get('/', [TaskController::class, 'index']);
Route::post('/create', [TaskController::class, 'create']);
Route::get('/store', [TaskController::class, 'store']);
Route::get('/show', [TaskController::class, 'show']);
Route::get('/edit', [TaskController::class, 'edit']);
Route::put('/update', [TaskController::class, 'update']);
Route::get('/delete', [TaskController::class, 'create']);
})
// Tasks inside that /app group:
Route::get('/', [TaskController::class, 'index']);
Route::post('/create', [TaskController::class, 'create']);
Route::get('/store', [TaskController::class, 'store']);
Route::get('/show', [TaskController::class, 'show']);
Route::get('/edit', [TaskController::class, 'edit']);
Route::put('/update', [TaskController::class, 'update']);
Route::get('/delete', [TaskController::class, 'create']);
});


// Task 7: point URL /app/dashboard to a "Single Action" DashboardController
// Assign the route name "dashboard"
// Put one Route Group code line here below

Route::get('/app/dashboard', DashboardController::class)->name('dashboard');
Route::group(function () {
Route::get('/app/dashboard', DashboardController::class)->name('dashboard');
});

// Task 8: Manage tasks with URL /app/tasks/***.
// Add ONE line to assign 7 resource routes to TaskController
Expand All @@ -89,17 +90,17 @@
// Assign middleware called "is_admin" to them
// Put one Route Group code line here below
Route::group(['prefix' => '/admin', 'middleware' => 'is_admin'], function () {
// Tasks inside that /admin group:
// 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('/admin/dashboard' ,Admin/DashboardController::class);
Route::get('/admin/dashboard', Admin\DashboardController::class);
// Task 11: point URL /admin/stats to a "Single Action" Admin/StatsController
// Put one code line here below
Route::get('/admin/stats' , Admin/DashboardController::class);
Route::get('/admin/stats', Admin\DashboardController::class);
// End of the /admin Route Group

// End of the main Authenticated Route Group
Expand Down

0 comments on commit 2702889

Please sign in to comment.