Ken 1 mese fa
parent
commit
935411d5b5
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      app/Http/Controllers/Api/Sport.php

+ 2 - 2
app/Http/Controllers/Api/Sport.php

@@ -10,10 +10,10 @@ class Sport extends Controller
 {
     public function index()
     {
-        $date = request()->input('date');
+        $date = request()->input('date', date('Y-m-d'));
         $start = strtotime($date);
         $end = strtotime("+1 day", $start);
-        return $this->success(['start'=>$start,'end'=>$end]);
+        return $this->success(['start' => $start, 'end' => $end]);
 //        SportModel::
     }
 }