✨ 🔧 Update npm + login page
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\UserController;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Inertia\Inertia;
|
||||
|
||||
@@ -14,9 +16,14 @@ use Inertia\Inertia;
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
Route::get('/login', function () {
|
||||
if (Auth::check()){return redirect('/');}
|
||||
return Inertia::render('Auth/login');
|
||||
})->name('login');
|
||||
Route::post('/login', [UserController::class, 'login']);
|
||||
Route::middleware(['auth'])->group(function(){
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
})->name('home');
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user