Skip to content

Examples ​

These examples include the PHP classes, templates, data setup, and mount calls needed for each interaction. Complete installation first.

ExampleDemonstrates
Article formEntity validation and saving
Renderless draft savesSave without replacing the current view
Search and paginationTable finders and bounded result pages
Dependent fieldsServer-derived choices and membership validation
Single document uploadFile staging, validation, and private storage
Job pollingPause/resume and completion controlled by PHP
Enhanced selectModelable inputs, protected DOM, and PHP resets
Chart updatesWatching server state and updating a library instance

Run the demo ​

The repository includes a separate playground with additional variations:

sh
composer install
npm ci
npm run build
npm run preview

Use PHP 8.5 with SQLite support and Node 24.11+ or Node 26+. Open http://127.0.0.1:8765. Fixtures seed automatically. The demo uses a test-only session identity; applications supply their own authentication.

Demo catalog ​

OpenTryFollow the implementation
/renderlessSave a draft, render validation feedback, and conditionally refreshRenderless draft saves
/formsArticle and comment drafts with FormHelperArticle form, form binding
/Search articles, edit two titles, save one, and keep the other draftArticle form, nested islands
/Change country, choose a city, and confirm the selectionDependent fields
/playgroundAdjust independent counters with typed action argumentsActions and feedback
/playgroundChange seats and extras; reveal business fields and validateConditional fields
/playgroundAdd, toggle, and remove tasks while other local state survivesTask board source
/playgroundRefresh the server clock; pause it or watch a simulated job completePolling
/playgroundUpdate two colored panels; recreate the one whose DOM is protectedMorph protection
/playgroundSearch countries in a JavaScript widget; validate, reset, and remove itJavaScript widgets
/uploadsStage documents, manage attachments, and validate before savingFile uploads
/searchFilter 1,200 resources; sort, change page size, and paginateSearch and pagination
/pageUpdate a whole-page listing while its layout stays in placePage islands

The /playground Failure recovery card demonstrates the failure and recovery workflow.

Playground state resets on reload. Article saves persist in the local fixture database. Search filters are reflected in the URL. The page number uses browser history; Back and Forward preserve unrelated reading notes.

Source and reset ​

The article form documentation imports its source from the demo in tests/test_app/. Other focused examples live in tests/docs/app/. Integration and browser tests exercise these same sources.

To reset demo data, stop the server and tests, then delete build/tmp/demo.sqlite. It is recreated on the next request. npm run preview disables OPcache so edits appear immediately. See Troubleshooting for asset or update failures and Contributing for quality checks.

Action outcomes ​

Save and redirect follows model validation with native navigation. Invoice download serves a file from a separate CakePHP endpoint. The larger demo combines both at /outcomes.

Lazy loading ​

Lazy resource count defers a finder query. Open /loading in the larger demo for all loading modes and nested preservation.

Open /navigation in the demo for enhanced visits and a persistent notebook, including active links, scroll, and application-owned loading feedback.

Renderless draft saves ​

The draft editor saves through CakePHP without rebuilding the form, with validation recovery and conditional rendering. Run it at /renderless in the demo.