lyrasoft / event-booking
LYRASOFT Event Booking Package
0.1.1
2024-07-22 08:42 UTC
Requires
- php: >=8.2
- brick/math: ^0.11.0
- chillerlan/php-qrcode: ^5.0
- lyrasoft/luna: ^2.1
- lyrasoft/sequence: ^1.0
Suggests
- lyrasoft/attachment: Install this if you want to ask attender upload certificate files.
- lyrasoft/member: Install this if you want to select tutors
README
安装
使用 Composer 安装
composer require lyrasoft/event-booking
EventBooking 依赖于 lyrasoft/sequence 请先阅读它们的 README 并进行配置。
然后将文件复制到项目中
php windwalker pkg:install lyrasoft/event-booking -t routes -t migrations -t seeders
播种器
将这些文件添加到 resources/seeders/main.php
return [ // ... __DIR__ . '/venue-seeder.php', __DIR__ . '/event-seeder.php', __DIR__ . '/event-order-seeder.php', ];
将这些类型添加到 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, ], ];
全局设置
工作进度
会话
由于 EventBooking 可能需要重定向到外部支付服务以处理结账,您必须禁用 SameSite
cookie 政策并将 secure
设置为 TRUE
。
// etc/packages/session.php return [ 'session' => [ // ... 'cookie_params' => [ // ... 'secure' => true, // <-- Set this to TRUE // ... 'samesite' => CookiesInterface::SAMESITE_NONE, // Set this to `SAMESITE_NONE` ],
语言文件
如果您不想覆盖语言,请将此行添加到管理端和前端中间件中
$this->lang->loadAllFromVendor('lyrasoft/shopgo', 'ini'); // OR $this->lang->loadAllFromVendor(EventBookingPackage::class, 'ini');
或者运行此命令以复制语言文件
php windwalker pkg:install lyrasoft/shopgo -t lang
注册管理菜单
编辑 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'); } );