Skip to content

Commit 3689850

Browse files
committed
added auth route
1 parent 16d1671 commit 3689850

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

routes/web.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
use Illuminate\Support\Facades\Route;
44
use App\Http\Controllers\HomeController;
5+
use App\Http\Controllers\LoginController;
56

6-
/*
7-
|--------------------------------------------------------------------------
8-
| Web Routes
9-
|--------------------------------------------------------------------------
10-
|
11-
| Here is where you can register web routes for your application. These
12-
| routes are loaded by the RouteServiceProvider within a group which
13-
| contains the "web" middleware group. Now create something great!
14-
|
15-
*/
7+
Route::impersonate();
168

179
Route::get('/', [HomeController::class, 'home'])->name('home');
10+
11+
Route::get('login', [LoginController::class, 'showLoginForm'])->name('login');
12+
Route::post('login', [LoginController::class, 'login'])->name('login.attempt');
13+
Route::get('logout', [LoginController::class, 'showLogoutForm'])->name('logout')->middleware('auth');
14+
Route::post('logout', [LoginController::class, 'logout'])->name('logout.attempt')->middleware('auth');

0 commit comments

Comments
 (0)