alengo/alengo-voucher-bundle

券包

0.4.2 2024-07-27 07:53 UTC

This package is auto-updated.

Last update: 2024-09-27 08:32:32 UTC


README

GitHub license GitHub tag (latest SemVer) Sulu compatibility

需求

  • PHP 8.1
  • Symfony >=6.0

安装包

执行以下 composer 命令

composer require alengo/alengo-voucher-bundle

启用包

通过将包添加到项目 config/bundles.php 文件中注册的包列表中启用包

return [
    /* ... */
    Alengo\Bundle\AlengoVoucherBundle\AlengoVoucherBundle::class => ['all' => true],
];
bin/console do:sch:up --force

配置包

在您的 routes_admin.yaml 中设置以下配置

app.voucher_categories_api:
   type: rest
   resource: Alengo\Bundle\AlengoVoucherBundle\Controller\Admin\VoucherCategoriesController
   prefix: /admin/api
   name_prefix: app.

app.voucher_orders_api:
   type: rest
   resource: Alengo\Bundle\AlengoVoucherBundle\Controller\Admin\VoucherOrdersController
   prefix: /admin/api
   name_prefix: app.

在 /config/packages/alengo_voucher.yaml 中定义是否按网站空间查询券

   alengo_voucher:
       per_webspace: true