Coole is a PHP framework built on open source components. - Coole 是一个基于开源组件构建的 PHP 框架。
- PHP >= 7.3
$ composer require guanguans/coole -vvv
<?php
use Coole\Foundation\App;
use Coole\Routing\Facades\Router;
use Symfony\Component\HttpFoundation\Request;
require __DIR__.'/vendor/autoload.php';
// 1. Create App.
$app = new App();
$app['debug'] = true;
// 2. Add route with closure middleware.
Router::get('/', function (){
return 'This is the Coole framework.';
})->setMiddleware(function (Request $request, Closure $next){
$response = $next($request);
$response->headers->set('X-Coole-Version', App::version());
return $response;
});
// 3. Run service.
$app->run();
$ composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.