lyrasoft/event-booking

LYRASOFT Event Booking Package

安装: 51

依赖项: 0

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 0

开放性问题: 5

类型:windwalker-package

0.1.1 2024-07-22 08:42 UTC

This package is auto-updated.

Last update: 2024-09-22 08:58:08 UTC


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');
    }
);