diff --git a/app/models/License.php b/app/models/License.php index 8c4cd56f07..44b49ed107 100755 --- a/app/models/License.php +++ b/app/models/License.php @@ -171,6 +171,7 @@ public function freeSeat() return License::whereNotNull('expiration_date') ->whereNull('deleted_at') ->whereRaw(DB::raw( 'DATE_SUB(`expiration_date`,INTERVAL '.$days.' DAY) <= DATE(NOW()) ' )) + ->where('expiration_date','<',date("Y-m-d")) ->orderBy('expiration_date', 'ASC') ->get();