Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function tampilPertanyaanIps(){
- // $chapters = DailyTest::where([["subject_id", "=", 1], ["grade_id", "=", 1], ["chapter_id", "=", 1]])->get();
- $chapters = DB::table('daily_tests')
- ->join('grades','daily_tests.grade_id','=','grades.id')
- ->join('subjects','daily_tests.subject_id','=','subjects.id')
- ->join('chapters','daily_tests.chapter_id','=','chapters.id')
- ->select('grades.name','subjects.name','chapters.name','daily_tests.question')
- ->where('grades.id','=',1)
- ->where('subjects.id','=',1)
- ->where('chapters.id','=',10)
- ->get();
- return response()->json(['data' => $chapters], 200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement