This commit is contained in:
2025-02-10 01:58:12 +02:00
parent 25d99e7b72
commit 87bbfc33d3
242 changed files with 38662 additions and 99 deletions
@@ -3,12 +3,22 @@
namespace App\Http\Controllers\Forum;
use App\Http\Controllers\Controller;
use App\Models\Forum\Category;
use App\Models\Forum\Thread;
use App\Models\Forum\Topic;
use Illuminate\Http\Request;
class ThreadsController extends Controller
{
public function show(string $threadSlug)
public function show(string $categorySlug, string $threadSlug)
{
$category = Category::where('slug', $categorySlug)->first();
$thread = Thread::where('slug', $threadSlug)->first();
$topics = Topic::where('category_id', $category->id)
->where('thread_id', $thread->id)
->paginate(15);
return view('forum.thread', compact('category', 'thread', 'topics'));
}
}
@@ -3,9 +3,13 @@
namespace App\Http\Controllers\Forum;
use App\Http\Controllers\Controller;
use App\Http\Requests\Forum\TopicRequest;
use Illuminate\Http\Request;
class TopicsController extends Controller
{
//
public function create(TopicRequest $request)
{
return view('forum.topics.create');
}
}