PHP code example of settermjd / laminas-static-pages

1. Go to this page and download the library: Download settermjd/laminas-static-pages 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/ */

    

settermjd / laminas-static-pages example snippets


$aggregator = new ConfigAggregator([
    \StaticPages\ConfigProvider::class,
]);

public function getTemplates() : array
{
    return [
        'paths' => [
            'static-pages' => [__DIR__ . '/../templates/static-pages'],
        ],
    ];
}

$app->get('/privacy', StaticPagesHandler::class, 'static.privacy');