mirror of
https://github.com/notrab/dumbo.git
synced 2025-01-16 21:58:25 +01:00
renovate[bot]
d9ef0f82a4
Update dependency phpunit/phpunit to v11 (#2)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Dumbo
A lightweight, friendly PHP framework for HTTP — inspired by Hono.
Install
composer require notrab/dumbo
Quickstart
<?php
use Dumbo\Dumbo;
$app = new Dumbo();
$app->get("/", function ($c) {
return $c->text("Welcome to Dumbo!");
});
$app->get("/json", function ($c) {
return $c->json(["message" => "Hello from Dumbo!"]);
});
$app->get("/user/:name", function ($c) {
$name = $c->param("name");
return $c->text("Hello, $name!");
});
$app->get("/greet/:greeting/:name", function ($c) {
$greeting = $c->param("greeting");
$name = $c->param("name");
return $c->json([
"message" => "$greeting, $name!",
]);
});
$app->run();
Description
Languages
PHP
100%