🔧 Update npm + login page

This commit is contained in:
TiclemFR
2024-01-25 14:00:48 +01:00
parent 468c2cd0e6
commit 336f2bae93
128 changed files with 3078 additions and 2368 deletions

View File

@@ -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');
});