lots of improvements

This commit is contained in:
Doar Mihai
2026-02-22 20:02:34 +02:00
parent 83fc389755
commit 29b5eca900
69 changed files with 3460 additions and 434 deletions
+44
View File
@@ -6,6 +6,10 @@ use Illuminate\Support\Facades\Route;
use App\Http\Controllers\GameController;
use App\Http\Controllers\ReviewController;
use App\Http\Controllers\GameListController;
use App\Http\Controllers\ForumCategoryController;
use App\Http\Controllers\ForumThreadController;
use App\Http\Controllers\ForumTopicController;
use App\Http\Controllers\ForumPostController;
//Route::get('/', function () {
// return view('landing');
@@ -50,4 +54,44 @@ Route::middleware('auth')->group(function () {
Route::delete('lists/{list}/games/{game}', [GameListController::class, 'removeGame'])->name('lists.removeGame');
});
// Forum Routes
Route::prefix('forum')->name('forum.')->group(function () {
// Public forum routes
Route::get('/', [ForumCategoryController::class, 'index'])->name('index');
Route::get('/categories/{category}', [ForumCategoryController::class, 'show'])->name('categories.show');
Route::get('/threads/{thread}', [ForumThreadController::class, 'show'])->name('threads.show');
Route::get('/topics/{topic}', [ForumTopicController::class, 'show'])->name('topics.show');
// Authenticated forum routes
Route::middleware('auth')->group(function () {
// Categories (admin only in a real app)
Route::get('/categories/create', [ForumCategoryController::class, 'create'])->name('categories.create');
Route::post('/categories', [ForumCategoryController::class, 'store'])->name('categories.store');
Route::get('/categories/{category}/edit', [ForumCategoryController::class, 'edit'])->name('categories.edit');
Route::put('/categories/{category}', [ForumCategoryController::class, 'update'])->name('categories.update');
Route::delete('/categories/{category}', [ForumCategoryController::class, 'destroy'])->name('categories.destroy');
// Threads
Route::get('/threads/create', [ForumThreadController::class, 'create'])->name('threads.create');
Route::post('/threads', [ForumThreadController::class, 'store'])->name('threads.store');
Route::get('/threads/{thread}/edit', [ForumThreadController::class, 'edit'])->name('threads.edit');
Route::put('/threads/{thread}', [ForumThreadController::class, 'update'])->name('threads.update');
Route::delete('/threads/{thread}', [ForumThreadController::class, 'destroy'])->name('threads.destroy');
// Topics
Route::get('/topics/create', [ForumTopicController::class, 'create'])->name('topics.create');
Route::post('/topics', [ForumTopicController::class, 'store'])->name('topics.store');
Route::get('/topics/{topic}/edit', [ForumTopicController::class, 'edit'])->name('topics.edit');
Route::put('/topics/{topic}', [ForumTopicController::class, 'update'])->name('topics.update');
Route::delete('/topics/{topic}', [ForumTopicController::class, 'destroy'])->name('topics.destroy');
// Posts
Route::get('/posts/create', [ForumPostController::class, 'create'])->name('posts.create');
Route::post('/posts', [ForumPostController::class, 'store'])->name('posts.store');
Route::get('/posts/{post}/edit', [ForumPostController::class, 'edit'])->name('posts.edit');
Route::put('/posts/{post}', [ForumPostController::class, 'update'])->name('posts.update');
Route::delete('/posts/{post}', [ForumPostController::class, 'destroy'])->name('posts.destroy');
});
});
require __DIR__.'/auth.php';