Proper Format Date Added

This commit is contained in:
devansh bawari 2021-02-02 15:22:15 +05:30
parent 3033ec834f
commit ead9500ef3
1 changed files with 2 additions and 2 deletions

View File

@ -581,12 +581,12 @@ class CartRule
->where('cart_rule_channels.channel_id', $channelId)
->where(function ($query1) {
/** @var Builder $query1 */
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d'))
$query1->where('cart_rules.starts_from', '<=', Carbon::now()->format('Y-m-d H:m:s'))
->orWhereNull('cart_rules.starts_from');
})
->where(function ($query2) {
/** @var Builder $query2 */
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d'))
$query2->where('cart_rules.ends_till', '>=', Carbon::now()->format('Y-m-d H:m:s'))
->orWhereNull('cart_rules.ends_till');
})
->with([