I use Query builder in laravel in the first table (student) there are 500 data in my second table (class) there are 35 classes, why the data becomes more than 2000 , even though I only want to bring up 35 data in suitable with the (class) table.
Here is my code:
 $data = DB::table('class')
                ->join('student', 'class.student_id', '=', 'student.id')
                ->select('class.*','student.*')
                ->get();
via Chebli Mohamed
 
Aucun commentaire:
Enregistrer un commentaire