Download the PHP package nytodev/inertia-bundle without Composer

On this page you can find all versions of the php package nytodev/inertia-bundle. 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-bundle

Inertia.js Symfony Bundle

Symfony bundle implementing the Inertia.js v3 server-side protocol — the Symfony equivalent of inertiajs/inertia-laravel.

Tests Latest Version PHP


What is Inertia.js?

Inertia lets you build modern React, Vue, or Svelte single-page applications without building a separate API. You keep your Symfony controllers, routing, middleware, and authentication exactly as they are - controllers just return a component name and props instead of a Twig template.

On the first visit the server returns a full HTML page. On subsequent navigations it returns a lightweight JSON response and the JavaScript adapter swaps the component client-side without a full reload.


Requirements

PHP ^8.1 · Symfony ^6.4 / ^7.4 / ^8.0 · Twig ^3.0


Installation

Without Symfony Flex, register the bundle manually in config/bundles.php:


Quick start

1. Root Twig template

inertia(page) outputs <script data-page="app" type="application/json">...</script><div id="app"></div>.
inertiaHead(page) outputs SSR-rendered head tags (safe to include even without SSR).

2. Controller

3. JavaScript entry point (React)

4. A page component

That's it. The bundle handles first-visit HTML, subsequent XHR JSON responses, asset versioning, 302→303 redirect conversion, and partial reloads automatically.


Shared props

Set props that are available on every page (e.g. authenticated user, flash messages):


Prop types

Method Behaviour
$inertia->lazy(fn) / optional(fn) Never sent on full render, only on explicit partial reload
$inertia->always(fn) Always sent, even in partial reloads that filter other props
$inertia->defer(fn) Fetched by the client in a separate XHR after page load
$inertia->once(fn) Sent once, cached by the client
$inertia->merge(fn) Merged into the existing client value (infinite scroll)

Configuration


Documentation

Topic Link
Installation & configuration docs/installation.md
Rendering & shared props docs/rendering.md
All prop types docs/props.md
Asset versioning, redirects, history docs/features.md
Flash & validation errors docs/flash-errors.md
Server-Side Rendering docs/ssr.md
Testing docs/testing.md

License

MIT — see LICENSE.


All versions of inertia-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
symfony/console Version ^6.4 || ^7.0 || ^8.0
symfony/config Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/framework-bundle Version ^6.4 || ^7.0 || ^8.0
symfony/http-foundation Version ^6.4 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0
symfony/process Version ^6.4 || ^7.0 || ^8.0
symfony/twig-bridge Version ^6.4 || ^7.0 || ^8.0
symfony/twig-bundle Version ^6.4 || ^7.0 || ^8.0
twig/twig Version ^3.0
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 nytodev/inertia-bundle contains the following files

Loading the files please wait ...