PHP code example of bnomei / kirby3-plopfile

1. Go to this page and download the library: Download bnomei/kirby3-plopfile 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/ */

    

bnomei / kirby3-plopfile example snippets


// @PLOP_EXT_HOOK
// @PLOP_EXT_FILES_METHOD



return [
    'hooks' => [
        // Do not forget adding a `,` after existing array items
        'page.update:after' => function () { },
        // @PLOP_EXT_HOOK
    ],
];



Kirby::plugin('bnomei/example', [
    'options' => [
        // options
    ],
    // autoloader for two extension typs
    'snippets' => autoloader(__DIR__)->snippets(),
    'templates' => autoloader(__DIR__)->templates(),
    // other extensions
]);
bash
yarn global add plop@2
bash
plop template $ booking .blade.php defaults
bash
yarn init
composer init
jq -r '. + { config: { "optimize-autoloader": true } }' composer.json
composer