jengo/inertia
jengo/inertia is the official CodeIgniter 4 adapter for Inertia.js.
Inertia allows you to create fully client-side rendered, single-page apps (SPAs) without much of the complexity that comes with modern SPAs. It does this by leveraging existing server-side routing and controllers.
What's Inside
| Section | Description |
|---|---|
| Core Concept | How Inertia intercepts responses to swap page components. |
| Basic Usage | Returning Inertia responses from controllers. |
| Inertia v3 Features | Deferred, lazy, once, merge, and always props. |
| History & Navigation Control | Encrypt, clear, and preserve history state. |
| Shared Data | Share data across all pages via filters or BaseController. |
| The Client Side | Directory structure and accessing shared props. |
| SSR Support | Server-side rendering requirements. |
| Exception Handling & Error Pages | Render Inertia error components for SPA requests. |
Core Concept
Instead of returning a CodeIgniter View (view('welcome')), you return an Inertia response. Inertia intercepts this on the client side and dynamically swaps the page component without reloading the browser.
