$survey = Survey::where('status', true)->with('questions')->get(); return response()->json($survey);
Please note that all pasted data is publicly available.