1. Go to this page and download the library: Download flytachi/winter-kernel 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/ */
flytachi / winter-kernel example snippets
declare(strict_types=1);
use Flytachi\Winter\Kernel\App\Attribute\EnableWeb;
use Flytachi\Winter\Kernel\WinterApplication;
parent::run($argv);
}
}
#!/usr/bin/env php
chdir(__DIR__);
use Flytachi\Winter\Kernel\Http\Stereotype\Controller;
use Flytachi\Winter\Kernel\Route\Annotation\GetMapping;
final class PingController extends Controller
{
#[GetMapping('/ping')]
public function ping(): array
{
return ['pong' => true];
}
}