progress
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user