A microframework for PHP 5.4+
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Nice PHP microframework

Gitter

Build Status Coverage Code Climate Latest Release

Nice is a simple microframework for PHP 5.4 and later. Nice integrates nikic's FastRoute router with the Symfony2 HttpKernel and Dependency Injection components.

Nice comes with built-in session management, simple authentication, and logging utilizing Monolog. Twig, along with Doctrine DBAL and ORM integration is also available.

<?php

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Nice\Application;
use Nice\Router\RouteCollector;

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

$app = new Application();
$app->set('routes', function (RouteCollector $r) {
    $r->map('/', 'home', function (Request $request) {
        return new Response('Hello, world');
    });
});
$app->run();

Documentation

View the online documentation, or the check out the markdown documentation source code.