Browse Source

分享图片

Silent 6 years ago
parent
commit
fbc57173c3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Http/Controllers/TestController.php

+ 3 - 1
app/Http/Controllers/TestController.php

@@ -15,7 +15,9 @@ class TestController extends Controller
 {
 {
     public function index(Request $request)
     public function index(Request $request)
     {
     {
-        $items = CheckCard::where('student_id', 7)->whereNotNull('begin_date_time')->whereNotNull('end_date_time')->get()->pluck('begin_date_time');
+        $items = CheckCard::where('student_id', 7)->whereNotNull('begin_date_time')->whereNotNull('end_date_time')->get()->pluck('begin_date_time')->each(function ($item) {
+            return substr($item, 0, 10);
+        });
         dd($items);
         dd($items);
     }
     }
 }
 }