I have fetch data from database in laravel but now I want to display data like following image
public function crossTabDegreesPdf($degree){
$degAdmin_department = Auth('degAdmin')->user()->department_id;
$examcode = ExamCodeTb::where('is_active',1)->pluck('examcode');
$examcode = $examcode[0];
$student_records=DB::select("SELECT DISTINCT student_tbs.regno,student_tbs.stdName,student_tbs.stdfName,student_tbs.department_id,student_tbs.degree_id,college_tbs.name FROM student_tbs INNER JOIN college_tbs ON college_tbs.college_id = student_tbs.department_id WHERE department_id = $degAdmin_department AND degree_id = $degree");
$all_records = array();
foreach ($student_records as $record){
$regno = $record->regno;
department_id = $record->department_id;
$student_rollnos = DB::select("SELECT DISTINCT roll_no_tbs.regno,roll_no_tbs.rollno,roll_no_com_dets.subcode,roll_no_com_dets.obt40,subject_tbs.Na,subject_tbs.semester_id,subject_tbs.hours,dbo_web_part.P_name,dbo_web_part.OneRTwo FROM roll_no_tbs INNER JOIN roll_no_com_dets ON roll_no_com_dets.rollno = roll_no_tbs.rollno LEFT JOIN subject_tbs ON subject_tbs.code = roll_no_com_dets.subcode LEFT JOIN dbo_web_part ON dbo_web_part.part = roll_no_tbs.part where roll_no_tbs.regno= $regno ORDER BY roll_no_com_dets.rollno");
$all_records[] = array('students'=>$record,'rollnos'=>$student_rollnos);
}
return view('front.degadmins.degrees-pdf')->with('all_records' ,$all_records);
}
In my view want to display data something like the upload image
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire