PHP code example of touta / toutaphp

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

    

touta / toutaphp example snippets


use Touta\Framework\App;
use Touta\Eolas\ArrayLoader;

$app = App::create(new ArrayLoader(['app' => ['name' => 'MyApp']]));

$app->routes()->get('/hello/{name}', function (string $name): array {
    return ['message' => "Hello, {$name}!"];
});

$response = $app->handle('GET', '/hello/world');