PHP code example of lyrasoft / event-booking

1. Go to this page and download the library: Download lyrasoft/event-booking library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lyrasoft / event-booking example snippets


return [
    // ...
    
    __DIR__ . '/venue-seeder.php',
    __DIR__ . '/event-seeder.php',
    __DIR__ . '/event-order-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,
            ],
        ];

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


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

shell
php windwalker pkg:install lyrasoft/shopgo -t lang