Download the PHP package webkulwp/inertia without Composer

On this page you can find all versions of the php package webkulwp/inertia. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package inertia

webkul/inertia

Inertia.js server-side adapter for PHP — the equivalent of what inertia-laravel provides on Laravel, for any plain-PHP application.

It is framework-agnostic: everything runs on native PHP. When WordPress is loaded, its helpers (wp_json_encode, status_header, sanitize_text_field, wp_head / wp_footer in the default shell, the blog_charset option, …) are picked up automatically — no configuration needed.

It handles the full Inertia protocol:

Installation

While the package lives inside a project as a path repository, add to the project's composer.json:

Usage

Plain PHP

WordPress (custom HTML shell)

render() always terminates the request.

Configuration

Method Purpose
set_version( string\|callable $version ) Asset version used for the 409 stale-asset handshake.
set_root_view( callable $renderer ) Renderer for the HTML shell on standard visits. Receives ( string $page_json, array $page ) and must output the full document.
set_app_id( string $id ) Container / script id used by the built-in fallback shell (default app). Only relevant when no root view is set.
set_charset( string $charset ) Response charset (default UTF-8). Under WordPress the blog_charset option takes precedence.

If no root view is configured, a minimal shell is rendered: a JSON script tag plus an empty <div id="<app id>"> — and, inside WordPress, wp_head() / wp_footer() / body_class() are included automatically.

Examples

Runnable end-to-end examples live in examples/:

Each folder is a standalone mini-app: php -S localhost:8000 index.php.


All versions of inertia with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webkulwp/inertia contains the following files

Loading the files please wait ...