PHP code example of stefanotorresi / my-pages

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

    

stefanotorresi / my-pages example snippets


   // somewhere in your router config
   'static-page-route' => [
       'type' => 'literal',
       'options' => [
           'route' => '/static-page'
           'defaults' => [
               'controller' => 'MyPages\PageController',
               'page' => 'static-page-template',
           ],
       ],
   ]

// somewhere in your autoloaded configs
'MyPages' => [
    'route_param_name' => 'page',
    'template_dir' => 'pages',
],