PHP Classes

File: app/routes.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   Minimalist PHP Sales Site   app/routes.php   Download  
File: app/routes.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Minimalist PHP Sales Site
Implement a sales site from configuration files
Author: By
Last change:
Date: 4 months ago
Size: 471 bytes
 

Contents

Class file image Download
<?php
/**
 * (c) Pierre-Henry Soria <hi@ph7.me>
 * MIT License - https://opensource.org/licenses/MIT
 */

namespace PHenry\App;

use
PHenry\App\Kernel\Http\Router;

Router::get('/', function () {
    return require
__DIR__ . '/pages/homepage.page.php';
});

Router::get('/contact', function () {
    return require
__DIR__ . '/pages/contact.page.php';
});

Router::get('/product', function () {
    return require
__DIR__ . '/pages/product.page.php';
});

Router::run();