PHP code example of sayamaapps / kirby-higawari

1. Go to this page and download the library: Download sayamaapps/kirby-higawari 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/ */

    

sayamaapps / kirby-higawari example snippets


return [
    'sayamaapps.higawari.active' => true,
];

// The page that renders the template:
snippet('higawari');

// Another page, and a fixed clock (a DateTimeImmutable, for tests and previews):
snippet('higawari', ['source' => $site->homePage(), 'now' => $customNow]);

$card = $page->higawariCard();                    // now, in the configured zone
// [
//     'from' => '2026-10-10', 'to' => '2026-10-10',   // mode until: from is today, to the date
//     'dishes' => [
//         ['name' => 'Kartoffelsuppe', 'lines' => ['mit Brot', 'und Kräutern'], 'price' => '6,90 €', 'markers' => 'V, L'],
//     ],
// ]
// or null: plugin off, not valid that day, or no usable dish

use Higawari\Menu;

$page->update(Menu::CLEARED);   // all dishes and the date, in one step