-
Notifications
You must be signed in to change notification settings - Fork 0
Quickstart
Technomantus Corvi edited this page Sep 5, 2026
·
1 revision
If your machine has nothing installed yet, see the full Prerequisites steps. Short version for Ubuntu/Mint:
sudo apt update
sudo apt install php8.1 php8.1-cli php8.1-mysql php8.1-xml php8.1-mbstring php8.1-curl php8.1-zip unzip
sudo apt install mariadb-server
sudo systemctl enable --now mariadb
sudo mysql_secure_installationCreate a database and a dedicated user:
sudo mysql -u root -pCREATE DATABASE my_database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'my_app_user'@'localhost' IDENTIFIED BY 'a_strong_password';
GRANT ALL PRIVILEGES ON my_database.* TO 'my_app_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;git clone <repo-url> my-project
cd my-project
cp .env-example .env
nano .envSet at minimum: DB_NAME, DB_USER, DB_PASS, APP_URL.
php -S localhost:8050 -t public public/index.phpVisit http://localhost:8050. You should see the home page.
Visit http://localhost:8050/todo — this is a complete working example (model, controller, routes, views). See Models and Controllers & Requests to understand how it's built, then use it as a template for your own resources.
-
Route — add to
routes.php:
'GET /hello' => 'HelloController@index',-
Controller — create
controllers/HelloController.php:
<?php
class HelloController extends Controller
{
public function index(): void
{
$this->view('hello/index', ['title' => 'Hello']);
}
}-
View — create
views/hello/index.php:
<h1>Hello, Tanuki!</h1>- Visit
http://localhost:8050/hello.
No configuration, no code generation — the autoloader finds HelloController by its class name automatically.
- Project Structure — understand where everything lives
- Routing — route parameters, method override
- Models — the Active Record API
- Security — what's handled for you, what you still need to do
- Want login and an admin panel? See Authentication and Admin Panel — both are optional extras you can add whenever you need them.