Silent 6 سال پیش
والد
کامیت
cac229db56
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      app/Http/Controllers/TestController.php

+ 2 - 2
app/Http/Controllers/TestController.php

xqd
@@ -15,8 +15,8 @@ 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')->each(function ($item) {
-            $item = substr($item, 0, 10);
+        $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);
         });
         dd($items);
     }