PHP code example of pionia / pionia-app

1. Go to this page and download the library: Download pionia/pionia-app 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/ */

    

pionia / pionia-app example snippets


defer(function () use ($order) {
    logger()->info('Processed after response', ['id' => $order->id]);
});

bootstrap/          AppRealm + routes
environment/        .env, settings.ini
public/             Web root (index.php)
services/           Business logic (*Action methods)
switches/           ApiSwitch subclasses (service registry per API version)
storage/            cache, logs
worker.php          RoadRunner worker entry
.rr.yaml            RoadRunner config (HTTP + jobs)
pionia              CLI entry
bash
php pionia frontend:scaffold --framework=react-ts --yes
php pionia serve              # terminal 1 — API on PORT (8000)
php pionia frontend:dev       # terminal 2 — Vite on :5173, proxies /api
php pionia frontend:build     # production — copies dist/ → public/
bash
php pionia rr:setup        # downloads ./rr binary (alias: composer rr:setup)
php pionia runserver       # foreground on http://127.0.0.1:8000
php pionia runserver --detach
php pionia runserver:logs
php pionia stopserver
bash
composer install --no-dev -o
php pionia optimize
yaml
server:
  command: "php -d opcache.enable_cli=1 -d opcache.preload=./bootstrap/preload.php worker.php"