progress
This commit is contained in:
+16
-12
@@ -15,24 +15,28 @@ Route::get('/dashboard', function () {
|
||||
})->middleware(['auth', 'verified'])->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');
|
||||
// Authenticated profile routes
|
||||
Route::get('/profile', [ProfileController::class, 'show'])->name('profile');
|
||||
Route::get('/profile/edit', [ProfileController::class, 'edit'])->name('profile.edit');
|
||||
Route::put('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
||||
Route::get('/profile/reviews', [ProfileController::class, 'reviews'])->name('profile.reviews');
|
||||
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
|
||||
|
||||
// Review routes
|
||||
Route::get('/games/{game:slug}/reviews/create', [ReviewController::class, 'create'])->name('games.reviews.create');
|
||||
Route::post('/games/{game:slug}/reviews', [ReviewController::class, 'store'])->name('games.reviews.store');
|
||||
Route::get('/reviews/{review}', [ReviewController::class, 'show'])->name('reviews.show');
|
||||
Route::get('/reviews/{review}/edit', [ReviewController::class, 'edit'])->name('reviews.edit');
|
||||
Route::put('/reviews/{review}', [ReviewController::class, 'update'])->name('reviews.update');
|
||||
Route::delete('/reviews/{review}', [ReviewController::class, 'destroy'])->name('reviews.destroy');
|
||||
});
|
||||
|
||||
// Public profile routes
|
||||
Route::get('/profile/{user:slug}', [ProfileController::class, 'show'])->name('profile.show');
|
||||
|
||||
Route::get('/games', [App\Http\Controllers\GameController::class, 'index'])->name('games.index');
|
||||
Route::get('/games/{game:slug}', [App\Http\Controllers\GameController::class, 'show'])->name('games.show');
|
||||
|
||||
// Review routes
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::get('/games/{game:slug}/reviews/create', [App\Http\Controllers\ReviewController::class, 'create'])->name('games.reviews.create');
|
||||
Route::post('/games/{game:slug}/reviews', [App\Http\Controllers\ReviewController::class, 'store'])->name('games.reviews.store');
|
||||
Route::get('/games/{game:slug}/reviews/{review}', [App\Http\Controllers\ReviewController::class, 'show'])->name('games.reviews.show');
|
||||
Route::get('/games/{game:slug}/reviews/{review}/edit', [App\Http\Controllers\ReviewController::class, 'edit'])->name('games.reviews.edit');
|
||||
Route::put('/games/{game:slug}/reviews/{review}', [App\Http\Controllers\ReviewController::class, 'update'])->name('games.reviews.update');
|
||||
Route::delete('/games/{game:slug}/reviews/{review}', [App\Http\Controllers\ReviewController::class, 'destroy'])->name('games.reviews.destroy');
|
||||
});
|
||||
|
||||
// Public review routes
|
||||
Route::get('/games/{game:slug}/reviews', [App\Http\Controllers\ReviewController::class, 'index'])->name('games.reviews.index');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user