mirror of
https://github.com/10h30/Test-Laravel-Auth-Basics.git
synced 2026-06-05 15:07:43 +09:00
32 lines
1.1 KiB
PHP
32 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Web Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register web routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| contains the "web" middleware group. Now create something great!
|
|
|
|
|
*/
|
|
|
|
Route::get('/', function () {
|
|
return view('home');
|
|
})->name('home');
|
|
|
|
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');
|
|
|
|
// 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')
|
|
->name('secretpage');
|
|
|
|
require __DIR__.'/auth.php';
|