<?php

namespace App\Http\Controllers;

use App\Models\CheckCard;
use App\Models\Student;
use App\Models\StudentCourse;
use App\Services\Admin\AdminUser;
use Carbon\Carbon;
use GuzzleHttp\Client;
use Illuminate\Http\Request;
use Intervention\Image\Facades\Image;

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);
    }
}
