id)->withOrder($request->order)->with('user', 'category')->paginate(); $active_users = $user->getActiveUsers(); return view('topics.index', compact('topics', 'category', 'active_users')); } }