PHP code example of unicframework / unic
1. Go to this page and download the library: Download unicframework/unic 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/ */
unicframework / unic example snippets
use Unic\App;
$app = new App();
$app->get('/', function($req, $res) {
$res->send('Hello, World!');
});
$app->get('/api', function($req, $res) {
$res->json([
'status' => 'Ok',
]);
});
$app->start();