This commit is contained in:
NaggaDIM
2025-01-02 00:05:09 +03:00
parent 2d071320a3
commit 277a5d5a31
16 changed files with 297 additions and 397 deletions

View File

@@ -1,24 +1,20 @@
<?php
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\IndexController;
use App\Http\Controllers\NeedVerificationController;
use App\Http\Controllers\ProfileController;
use Illuminate\Foundation\Application;
use App\Http\Middleware\ProfileVerificationMiddleware;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
Route::get('/', function () {
return Inertia::render('Welcome', [
'canLogin' => Route::has('login'),
'canRegister' => Route::has('register'),
'laravelVersion' => Application::VERSION,
'phpVersion' => PHP_VERSION,
]);
});
Route::get('/', IndexController::class)->name('index');
Route::get('/dashboard', function () {
return Inertia::render('Dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
Route::middleware(['auth', ProfileVerificationMiddleware::class])->group(function () {
Route::get('/need-verification', NeedVerificationController::class)->name('profile.need-verification');
Route::get('/dashboard', DashboardController::class)->name('dashboard');
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');