PHP code example of guanguans / coole
1. Go to this page and download the library: Download guanguans/coole library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
guanguans / coole example snippets
use Coole\Foundation\App;
use Coole\Routing\Facades\Router;
use Symfony\Component\HttpFoundation\Request;
'/', 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();