/** * Display a listing of the resource. * * @return Response */ public function index() { $topics = Topic::select('id', 'title', 'user_id', 'ip', 'comments', 'updated_at')->orderBy('updated_at', 'desc')->paginate(30); $topics->load(['user' => function ($query) { $query->select('id', 'name'); }]); return view('bbs.index', ['topics' => $topics]); }