brenoroosevelt / http
Http router and dispatcher for development purpose
0.0.3
2023-04-30 17:27 UTC
Requires
- php: >=7.4
- brenoroosevelt/habemus: ^1.1
- laminas/laminas-diactoros: ^2
- laminas/laminas-httphandlerrunner: ^1 || ^2
- league/route: ^5
- middlewares/utils: @stable
- middlewares/whoops: @stable
README
Http router and dispatcher for development purpose.
Install
Via composer
$ composer require brenoroosevelt/http
Usage
<?php declare(strict_types=1); use BrenoRoosevelt\Http\Http; use Laminas\Diactoros\Response\HtmlResponse; use Middlewares\Whoops; require "../vendor/autoload.php"; $app = new Http(); $app->append(new Whoops()); $app->get('/', function () { return new HtmlResponse("<h1>Olá, mundo!</h1>"); }); $app->run();