Files
Test-Laravel-Auth-Basics/routes/web.php
T
2021-10-31 18:48:55 +02:00

27 lines
919 B
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');
require __DIR__.'/auth.php';