Lattice is a server-driven UI framework for Laravel that lets developers define pages, forms, tables, and actions entirely in PHP, which are then serialized and rendered as typed React components via Inertia.js. Pages are PHP classes with an `#[AsPage]` attribute that auto-registers routes. Forms extend `FormDefinition` with Laravel validation rules and optional live validation via Precognition. Tables extend `EloquentTableDefinition` with declarative columns supporting sorting, filtering, and pagination. Actions return `ActionResult` objects carrying client-side effects like toasts and component reloads. The server becomes the single source of truth for UI structure, while the React client only handles rendering.

4m read timeFrom laravel-news.com
Post cover image
Table of contents
# Pages# Forms# Tables# Actions and client effects# Learn More
201.1K Impressions8 Comments