PHP code example of notrab / dumbo
1. Go to this page and download the library: Download notrab/dumbo 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/ */
notrab / dumbo example snippets
= new Dumbo\Dumbo();
$app->get('/', fn($context) => $context->json(['message' => 'Hello, Dumbo!']));
$app->get('/users/:id', fn($context) => $context->json([
'id' => $context->req->param('id'),
]));
$app->run();
bash
php -S localhost:8000 index.php