示例#1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $questions = Question::with('tags', 'user', 'answersCount')->orderBy('created_at', 'desc')->paginate(20);
     $pagination = new AdminPaginator($questions);
     return view('questions.index')->with(['questions' => $questions, 'pagination' => $pagination]);
 }