This commit is contained in:
2025-08-16 15:38:07 +03:00
parent 11dabec67e
commit d709de39dc
7 changed files with 154 additions and 84 deletions
@@ -15,7 +15,12 @@ class ThreadsController extends Controller
$category = Category::where('slug', $categorySlug)->first();
$thread = Thread::where('slug', $threadSlug)->first();
$topics = Topic::where('category_id', $category->id)
if (!$category || !$thread) {
abort(404);
}
$topics = Topic::with('author')
->where('category_id', $category->id)
->where('thread_id', $thread->id)
->paginate(15);