Skip to content

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 ​

SectionDescription
Core ConceptHow Inertia intercepts responses to swap page components.
Basic UsageReturning Inertia responses from controllers.
Inertia v3 FeaturesDeferred, lazy, once, merge, and always props.
History & Navigation ControlEncrypt, clear, and preserve history state.
Shared DataShare data across all pages via filters or BaseController.
The Client SideDirectory structure and accessing shared props.
SSR SupportServer-side rendering requirements.
Exception Handling & Error PagesRender 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.

Released under the MIT License.