PHP code example of deweppro / framework

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

    

deweppro / framework example snippets


 declare(strict_types=1);

DIR__.'/../config.yml');

(new Dewep\Application())->bootstrap();

public function demo(Request $request, string $user) {}

class Routes
{
    public function handler()
    {
        $routes = [];

        $routes['/{user}/name']['GET'] = 'Dewep\Demo::demo';
        $routes['/{user}/name']['POST'] = 'Dewep\Demo::demo';
        $routes['/{user}/name']['PUT'] = 'Dewep\Demo::demo';
        
        $routes['/']['GET'] = 'Dewep\Demo::home';

        return $routes;
    }
}
bash
#!/usr/bin/env php


(__DIR__.'/config.yml');

(new Dewep\Console())->bootstrap();