Skip to content

Commit

Permalink
laravel-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Wen Xuan Goh committed Oct 17, 2024
1 parent 8af343c commit e38a539
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions routes/web.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?php

use App\Http\Controllers\Auth\AuthenticatedSessionController;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\TaskController;
use App\Http\Controllers\UserController;
use App\Http\Controllers\Admin\DashboardController as AdminDashboardController;
use App\Http\Controllers\Admin\StatsController as AdminStatsController;
use App\Http\Controllers\Admin\StatsController;
use Illuminate\Support\Facades\Route;

/*
Expand All @@ -27,13 +26,13 @@
// Task 2: point the GET URL "/user/[name]" to the UserController method "show"
// It doesn't use Route Model Binding, it expects $name as a parameter
// Put one code line here below
Route::get('users/{name}', [UserController::class, 'show']);
Route::get('/users/{name}', [UserController::class, 'show']);

// Task 3: point the GET URL "/about" to the view
// resources/views/pages/about.blade.php - without any controller
// Also, assign the route name "about"
// Put one code line here below
Route::view('/about', 'page.about')->name('about');
Route::view('/about', 'pages.about')->name('about');

// Task 4: redirect the GET URL "log-in" to a URL "login"
// Put one code line here below
Expand Down Expand Up @@ -75,11 +74,11 @@

// Task 10: point URL /admin/dashboard to a "Single Action" Admin/DashboardController
// Put one code line here below
Route::view('/dashboard', [AdminDashboardController::class]);
Route::get('/dashboard', [AdminDashboardController::class]);

// Task 11: point URL /admin/stats to a "Single Action" Admin/StatsController
// Put one code line here below
Route::view('/stats', [AdminStatsController::class]);
Route::get('/stats', [StatsController::class]);

});
// End of the /admin Route Group
Expand Down

0 comments on commit e38a539

Please sign in to comment.