PHP 8.4 framework

Interactive pages,
written in PHP.

Give a page its own PHP class and an HTML template. Atom renders the first view on the server and updates it when a visitor takes action.

Electron configuration

Live page action
Hydrogen Atomic number 1
1s¹
Electrons per shell1

Inside the example

How the counter works

HomePage.php
#[State]
public int $count = 1;

#[PageAction]
public function increment(): void
{
    $this->count = $this->count >= Element::LAST
        ? 1 : max(1, $this->count + 1);
}
HomePage.atom.html
<span>{{ $this->count }}</span>

<button type="button"
        atom:action="increment">
    Next element
</button>

Explore the framework