PHP code example of cyve / slim-platform
1. Go to this page and download the library: Download cyve/slim-platform 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/ */
cyve / slim-platform example snippets
// index.php
able('.env')) {
$_ENV = $_ENV + parse_ini_file('.env');
}
$app = new SlimPlatform\App();
// Add as many PSR-15 middlewares as you need
// Check some awesome middleware examples here: https://github.com/middlewares
$app->addMiddleware(new Middlewares\ResponseTime());
$app->addMiddleware(new Middlewares\GzipEncoder());
$app->addMiddleware(new Middlewares\Expires(['application/json' => '+1 hour']));
$app->run();