lyrasoft/event-booking
Composer 安装命令:
composer require lyrasoft/event-booking
包简介
LYRASOFT Event Booking Package
README 文档
README
Installation
Install from composer
composer require lyrasoft/event-booking
EventBooking dependents on lyrasoft/sequence Please read their README and configure them first.
Then copy files to project
php windwalker pkg:install lyrasoft/event-booking -t routes -t migrations -t seeders
Seeders
Add these files to resources/seeders/main.php
return [ // ... __DIR__ . '/venue-seeder.php', __DIR__ . '/event-seeder.php', __DIR__ . '/event-order-seeder.php', ];
Add these types to category-seeder.php
static function () use ($seeder, $orm, $db) { $types = [ // ... 'event' => [ 'max_level' => 1, 'number' => 10, ], // Venue catagoey is optional 'venue' => [ 'max_level' => 1, 'number' => 5, ], ];
Global Settings
WIP
Session
As EventBooking may need to redirect to outside Payment service to process checkout, you must disable SameSite cookie poilicy
and set secure as TRUE.
// etc/packages/session.php return [ 'session' => [ // ... 'cookie_params' => [ // ... 'secure' => true, // <-- Set this to TRUE // ... 'samesite' => CookiesInterface::SAMESITE_NONE, // Set this to `SAMESITE_NONE` ],
Language Files
Add this line to admin & front middleware if you don't want to override languages:
$this->lang->loadAllFromVendor('lyrasoft/shopgo', 'ini'); // OR $this->lang->loadAllFromVendor(EventBookingPackage::class, 'ini');
Or run this command to copy languages files:
php windwalker pkg:install lyrasoft/shopgo -t lang
Register Admin Menu
Edit resources/menu/admin/sidemenu.menu.php
$menu->link('活動', '#') ->icon('fal fa-calendar'); $menu->registerChildren( function (MenuBuilder $menu) use ($nav, $lang) { $menu->link('場館管理') ->to($nav->to('venue_list')) ->icon('fal fa-house-flag'); $menu->link('活動分類') ->to($nav->to('category_list')->var('type', 'event')) ->icon('fal fa-sitemap'); $menu->link('活動管理') ->to($nav->to('event_list')) ->icon('fal fa-calendar-days'); $menu->link('報名者管理') ->to($nav->to('event_attend_list')) ->icon('fal fa-users'); $menu->link('報名訂單管理') ->to($nav->to('event_order_list')) ->icon('fal fa-files'); } );
Payments
Add Ecpay Payment
Install Ecpay SDK
composer require ecpay/sdk
Register Ecpay payments
'payment' => [ // ... 'gateways' => [ // ... 'ecpay_credit' => fn () => create( \Lyrasoft\EventBooking\Payment\EcpayPayment::class, type: EcpayPaymentType::CREDIT, ), 'ecpay_atm' => fn () => create( \Lyrasoft\EventBooking\Payment\EcpayPayment::class, type: EcpayPaymentType::ATM ), 'ecpay_cvs' => fn () => create( \Lyrasoft\EventBooking\Payment\EcpayPayment::class, type: EcpayPaymentType::CVS ), ], ],
And add this to .env and .env.dist
EVENT_ECPAY_MERCHANT_ID=2000132 EVENT_ECPAY_HASH_KEY=5294y06JbISpM5x9 EVENT_ECPAY_HASH_IV=v77hoKGq4kWxNNIS
Add exclude to CsrfMiddleware for Ecpay notify URL
// routes/front.route.php ->middleware( CsrfMiddleware::class, excludes: [ // ... 'front::event_payment_task', ] )
lyrasoft/event-booking 适用场景与选型建议
lyrasoft/event-booking 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.33k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 07 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 lyrasoft/event-booking 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lyrasoft/event-booking 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.33k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-13