Working examples · V4.0.1

Create a JSON endpoint

Add this inside the routes/web.php registration callback.

Create a JSON endpoint

Prerequisites

PHP 8.2+ and a Corevia web application.

Example

Add this inside the routes/web.php registration callback.

php
$router->get('/status', static fn (): array => [
    'status' => 'ok',
    'framework' => 'Corevia',
])->name('status');

Verify

Run the example in a disposable local application. For routes, use php corevia route:list then request your endpoint. Generated modules, actions, and flows require explicit registration.

Updated 2026-11-22 · 4.0.1Suggest an improvement