fix voucher showing expiry "never"

This commit is contained in:
1day2die 2023-06-09 23:23:23 +02:00
parent 3a348ee894
commit 9a04f373f0

View file

@ -245,10 +245,10 @@ class VoucherController extends Controller
}) })
->editColumn('expires_at', function (Voucher $voucher) { ->editColumn('expires_at', function (Voucher $voucher) {
if (! $voucher->expires_at) { if (! $voucher->expires_at) {
return ''; return __("Never");
} }
return $voucher->expires_at ? $voucher->expires_at->diffForHumans() : ''; return $voucher->expires_at ? $voucher->expires_at->diffForHumans() : __("Never");
}) })
->editColumn('code', function (Voucher $voucher) { ->editColumn('code', function (Voucher $voucher) {
return "<code>{$voucher->code}</code>"; return "<code>{$voucher->code}</code>";