1. Go to this page and download the library: Download remetulla/tinymvc-php 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/ */
remetulla / tinymvc-php example snippets
namespace app\controllers;
use app\Controller;
class SiteController extends Controller
{
public function actionIndex()
{
return $this->render('index', ['title' => 'Hello']);
}
public function actionView(int $id)
{
return $this->render('view', ['id' => $id]);
}
}