newTable() ->addColumn('discount', function ($coupon) { return $coupon->is_percent ? "{$coupon->value}%" : $coupon->value->format(); }); } }