Silent 7 gadi atpakaļ
vecāks
revīzija
76efd056a4
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      app/Models/Student.php

+ 4 - 1
app/Models/Student.php

xqd xqd
@@ -5,6 +5,7 @@ namespace App\Models;
 use Carbon\Carbon;
 use function foo\func;
 use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Facades\Log;
 
 class Student extends Model
 {
@@ -109,12 +110,14 @@ class Student extends Model
         }
         $this_week_begin = $today->toDateTimeString();
         $this_week_end = $today->addDays(7)->toDateTimeString();
-
+        Log::info($this_week_begin);
+        Log::info($this_week_end);
         $tmp = Remark::where([
             ['student_id', '=', $this['id']],
             ['created_at', '>=', $this_week_begin],
             ['created_at', '<', $this_week_end],
         ])->first();
+        Log::info($tmp);
         return empty($tmp) ? true : false;
     }