@@ -58,7 +58,7 @@ discard block  | 
                                                    ||
| 58 | 58 | public static function boot()  | 
                                                        
| 59 | 59 |      { | 
                                                        
| 60 | 60 | parent::boot();  | 
                                                        
| 61 | -        self::creating(function ($model) { | 
                                                        |
| 61 | +        self::creating(function($model) { | 
                                                        |
| 62 | 62 | $model->id = (string) Uuid::generate(4);  | 
                                                        
| 63 | 63 | $model->created = now();  | 
                                                        
| 64 | 64 | });  | 
                                                        
@@ -71,15 +71,15 @@ discard block  | 
                                                    ||
| 71 | 71 | |
| 72 | 72 | public static function getStudentsCount($institution_class_id)  | 
                                                        
| 73 | 73 |      { | 
                                                        
| 74 | -        $total_male_students = self::with(['student' => function ($query) { | 
                                                        |
| 74 | +        $total_male_students = self::with(['student' => function($query) { | 
                                                        |
| 75 | 75 |              $query->where('student.gender_id', '=', 1); | 
                                                        
| 76 | -        }])->whereHas('student', function ($query) { | 
                                                        |
| 76 | +        }])->whereHas('student', function($query) { | 
                                                        |
| 77 | 77 |              $query->where('gender_id', '=', 1); | 
                                                        
| 78 | 78 |          })->where('institution_class_id', '=', $institution_class_id)->count(); | 
                                                        
| 79 | 79 | |
| 80 | -        $total_female_students = self::with(['student' => function ($query) { | 
                                                        |
| 80 | +        $total_female_students = self::with(['student' => function($query) { | 
                                                        |
| 81 | 81 |              $query->where('student.gender_id', '=', 2); | 
                                                        
| 82 | -        }])->whereHas('student', function ($query) { | 
                                                        |
| 82 | +        }])->whereHas('student', function($query) { | 
                                                        |
| 83 | 83 |              $query->where('gender_id', '=', 2); | 
                                                        
| 84 | 84 |          })->where('institution_class_id', '=', $institution_class_id)->count(); | 
                                                        
| 85 | 85 | |
@@ -109,8 +109,8 @@ discard block  | 
                                                    ||
| 109 | 109 |              ->where('student_id', $student['student_id']) | 
                                                        
| 110 | 110 |              ->join('institution_classes', 'institution_class_students.institution_class_id', '=', 'institution_classes.id') | 
                                                        
| 111 | 111 |              ->where('institution_class_students.student_id', $student['student_id']) | 
                                                        
| 112 | -            ->where('institution_class_students.academic_period_id',$student['academic_period_id']) | 
                                                        |
| 113 | -            ->where('institution_class_students.institution_id',$student['institution_id']) | 
                                                        |
| 112 | +            ->where('institution_class_students.academic_period_id', $student['academic_period_id']) | 
                                                        |
| 113 | +            ->where('institution_class_students.institution_id', $student['institution_id']) | 
                                                        |
| 114 | 114 |              ->whereNull('institution_class_students.deleted_at') | 
                                                        
| 115 | 115 | ->get()->first();  | 
                                                        
| 116 | 116 | }  | 
                                                        
@@ -135,12 +135,12 @@ discard block  | 
                                                    ||
| 135 | 135 | 'student_status_id' => 1,  | 
                                                        
| 136 | 136 | 'created_user_id' => 1  | 
                                                        
| 137 | 137 | ]);  | 
                                                        
| 138 | -        } catch (\Throwable $th) { | 
                                                        |
| 138 | +        }catch (\Throwable $th) { | 
                                                        |
| 139 | 139 | Log::error($th);  | 
                                                        
| 140 | 140 | }  | 
                                                        
| 141 | 141 | }  | 
                                                        
| 142 | 142 | |
| 143 | -    public static function createOrUpdate($studentId,$params,$file){ | 
                                                        |
| 143 | +    public static function createOrUpdate($studentId, $params, $file) { | 
                                                        |
| 144 | 144 | return self::create([  | 
                                                        
| 145 | 145 | 'student_id' => $studentId,  | 
                                                        
| 146 | 146 | 'institution_class_id' => $params['institution_class']->id,  |