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