alengo / alengo-voucher-bundle
券包
0.4.2
2024-07-27 07:53 UTC
Requires
- php: ^8.1
- sulu/sulu: ^2.5
- symfony/config: ^6.0 || ^7.0
- symfony/dependency-injection: ^6.0 || ^7.0
- symfony/framework-bundle: ^6.0 || ^7.0
- symfony/http-foundation: ^6.0 || ^7.0
- symfony/http-kernel: ^6.0 || ^7.0
- symfony/serializer: ^6.0 || ^7.0
- symfony/twig-bundle: ^6.0 || ^7.0
Requires (Dev)
- handcraftedinthealps/zendsearch: ^2.0
- jackalope/jackalope-doctrine-dbal: ^1.3.4 || ^2.0
- php-cs-fixer/shim: ^3.9
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.9
- phpstan/phpstan-doctrine: ^1.3
- phpstan/phpstan-symfony: ^1.2
- phpunit/phpunit: ^8.5 || ^9.5
- rector/rector: ^1.0.3
- sulu/sulu-rector: ^1.0.0
- symfony/browser-kit: ^6.0 || ^7.0
- symfony/console: ^6.0 || ^7.0
- symfony/dotenv: ^6.0 || ^7.0
- symfony/error-handler: ^6.0 || ^7.0
- symfony/monolog-bundle: ^3.1
README
需求
- 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