Silent %!s(int64=7) %!d(string=hai) anos
pai
achega
5a8fcad192
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Models/StudentCourse.php

+ 1 - 1
app/Models/StudentCourse.php

xqd
@@ -78,7 +78,7 @@ class StudentCourse extends Model
             return '';
         } else {
             $days = $this['duration'];
-            $leave_days = (int)Leave::where('student_id', $this['id'])->get()->count('days');
+            $leave_days = (int)Leave::where('student_id', $this['student_id'])->get()->count('days');
             $days += $leave_days;
             return Carbon::createFromTimestamp(strtotime($apply_date))->addDays($days)->toDateString();
         }