/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $questions = Question::latest()->paginate(20);
     $no = $questions->firstItem();
     return view('admin.questions.index', compact('questions', 'no'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $questions = Question::latest('created_at')->get();
     return view('questions.index', compact('questions'));
 }
 public function getAll()
 {
     return Question::latest()->get();
 }
 public function index()
 {
     $questions = Question::latest()->get();
     return view('questions.index')->with('questions', $questions);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $questions = Question::latest()->with('skill')->with('difficulty')->with('status')->with('user')->get();
     return view('questions.index', compact('questions'));
 }