Peak Peak v4.2.0

Fast, unopinionated and minimalist framework for PHP 7.
Build maintainable and powerful web applications and APIs!


<?php

use Peak\Backpack\Bedrock\HttpAppBuilder;
use Peak\Http\Response\Emitter;
use Psr\Http\Message\ServerRequestInterface as Request;
use Zend\Diactoros\Response\HtmlResponse;
use Zend\Diactoros\ServerRequestFactory;

require __DIR__ . '/../vendor/autoload.php';

$app = (new HttpAppBuilder())->build();

$app
    ->get('/hello/{name}', function (Request $request) {
        return new HtmlResponse('Hello ' . $request->args->name . '!', 200);
    })
    ->run(ServerRequestFactory::fromGlobals(), new Emitter());



Community

Slack
Join us there at peakframework.slack.com
Join Slack Channel