| xqd | @@ -15,9 +15,13 @@ class TestController extends Controller
 | 
	
		
			
				|  |  |  {
 | 
	
		
			
				|  |  |      public function index(Request $request)
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  | -        $items = CheckCard::where('student_id', 7)->whereNotNull('begin_date_time')->whereNotNull('end_date_time')->get()->pluck('begin_date_time')->map(function ($item) {
 | 
	
		
			
				|  |  | -            return substr($item, 0, 10);
 | 
	
		
			
				|  |  | -        })->unique();
 | 
	
		
			
				|  |  | -        dd($items);
 | 
	
		
			
				|  |  | +        $today = Carbon::today();
 | 
	
		
			
				|  |  | +        $this_week_begin = null;
 | 
	
		
			
				|  |  | +        while($today->dayOfWeekIso != 1) {
 | 
	
		
			
				|  |  | +            $today = $today->subDay();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $this_week_begin = $today->toDateTimeString();
 | 
	
		
			
				|  |  | +        $this_week_end = $today->addDays(7)->toDateTimeString();
 | 
	
		
			
				|  |  | +        dd($this_week_begin, $this_week_end);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  }
 |