app/Http/Controllers/QuestionController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $questions = Question::all();
        return QuestionResource::collection($questions);
    }
public function index ( ) { $ questions = Question :: all ( ) ; return QuestionResource :: collection ( $ questions ) ; }
Display a listing of the resource.
Display a listing of the resource .
// Get questions // Return collection of questions as a resource