diff --git a/routes/web.php b/routes/web.php
index 71d04297..ef6c7052 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -20,17 +20,21 @@
Route::get('users', [\App\Http\Controllers\UserController::class, 'index'])->name('users.index');
// Task: profile functionality should be available only for logged-in users
-Route::get('profile', [\App\Http\Controllers\ProfileController::class, 'show'])->name('profile.show');
-Route::put('profile', [\App\Http\Controllers\ProfileController::class, 'update'])->name('profile.update');
+Route::group(['middleware' => 'auth'], function () {
+ Route::get('profile', [\App\Http\Controllers\ProfileController::class, 'show'])->name('profile.show');
+ Route::put('profile', [\App\Http\Controllers\ProfileController::class, 'update'])->name('profile.update');
+});
// Task: this "/secretpage" URL should be visible only for those who VERIFIED their email
// Add some middleware here, and change some code in app/Models/User.php to enable this
Route::view('/secretpage', 'secretpage')
+ ->middleware('verified')
->name('secretpage');
// Task: this "/verysecretpage" URL should ask user for verifying their password once again
// You need to add some middleware here
Route::view('/verysecretpage', 'verysecretpage')
+ ->middleware(['password.confirm'])
->name('verysecretpage');
-require __DIR__.'/auth.php';
+require __DIR__ . '/auth.php';