Skip to content

Commit

Permalink
Update web.php
Browse files Browse the repository at this point in the history
  • Loading branch information
trr-code authored Dec 15, 2024
1 parent b99fa6b commit 9a91b87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@

// Task 1: point the main "/" URL to the HomeController method "index"
// Put one code line here below
oute::get('/', [HomeController::class, 'index']);
Route::get('/', [HomeController::class, 'index']);

// 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
oute::get('/user/{name}', [UserController::class, 'show']);
Route::get('/user/{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
oute::view('/about', 'pages.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
oute::redirect('log-in', 'login');
Route::redirect('log-in', 'login');

// Task 5: group the following route sentences below in Route::group()
// Assign middleware "auth"
Expand Down

0 comments on commit 9a91b87

Please sign in to comment.