PHP code example of louisgjbertrand / phpfram

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

    

louisgjbertrand / phpfram example snippets




    // Using Simple Router
    use Pecee\SimpleRouter\SimpleRouter;

    // Declaring a route
    SimpleRouter::get('/', function() {
        return "Fram, v1.0, Super Lightweight Framework";
    });

    // Add your routes here:
    SimpleRouter::get('/example', function() {
        return "this is an example route";
    });

    SimpleRouter::start();



    // Using Simple Router
    use Pecee\SimpleRouter\SimpleRouter;

    // Declaring a route
    SimpleRouter::get('/', function() {
        return "Fram, v1.0, Super Lightweight Framework";
    });

    // registering Errors
    

    SimpleRouter::start();

- php v7.3.2 and above
- Composer