1. Go to this page and download the library: Download ilias/rhetoric 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/ */
e_once __DIR__ . '/routes.php';
use Ilias\Rhetoric\Router\Router;
Router::setup();
namespace Ilias\Rhetoric\Controller;
class IndexController
{
public function handleApiIndex()
{
echo "Welcome to the API!";
}
public function favicon()
{
// Handle favicon request
}
}
namespace Ilias\Rhetoric\Middleware;
use Ilias\Rhetoric\Middleware\Middleware;
class ExampleMiddleware implements Middleware
{
public static function handle()
{
// Middleware logic here
}
}