Download the PHP package onix-systems-php/hyperf-inertia without Composer
On this page you can find all versions of the php package onix-systems-php/hyperf-inertia. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download onix-systems-php/hyperf-inertia
More information about onix-systems-php/hyperf-inertia
Files in onix-systems-php/hyperf-inertia
Package hyperf-inertia
Short Description The Hyperf adapter for Inertia.js.
License MIT
Informations about the package hyperf-inertia
Inertia.js Hyperf Adapter
Visit inertiajs.com to learn more.
Todo
- [ ] Programmatically initialize node_modules.
Installation
- require package.
- publish config and middleware from package.
npm init
init package.json if not exist- Initialize inertia.
-
Add commands to the package.json
- install node_modules packages
- Run inertia:
- for development
- for production
Note If you use Svelte, package.json type must be module.
Middleware
Next we need to setup the Inertia middleware, in file ./config/middlewares.php
. You can accomplish this by publishing the HandleInertiaMiddleware middleware to your application.
Note This middleware must be placed before the
validation
middleware.
Creating responses
Frontend Part
After executing php ./bin/hyperf.php inertia:init
you will get the
folder structure.
In folders , , you can create your own components, layouts and pages.
Ssr
In the process, you can select ssr. If you have set ssr separately, you can copy this file from Or read the inertia documentation .
How to run ssr
- into container run command to start ssr server.
Environment variables
-
- If you are using ssr, set to true. By default false.
-
- URL of the ssr server. By default http://127.0.0.1:13714.
-
- If you are using http, set to false. By default true.
-
- If you need to skip url, set to prefix. Prefixes should be specified as a string using the separator
,
. By default empty string. Example . All requests starting with this prefix will be skipped in inertia.
- If you need to skip url, set to prefix. Prefixes should be specified as a string using the separator
- When prefix exist in to , but an exception must be made for a separate path. The extra path should be specified as a string using the separator
,
. By default empty string. Example .
Examples of frontend files
In the package you can find example files for the frontend. vendor/onix-systems-php/hyperf-inertia/example There is also an example controller here.
- It is necessary to connect styles in inertia.blade.php
Note If you are using arm64, you need to add
@rollup/rollup-darwin-arm64
, this is only for svelte
All versions of hyperf-inertia with dependencies
ext-json Version *
ext-curl Version *
hyperf/command Version ^3.1
hyperf/config Version ^3.1
hyperf/collection Version ^3.1
hyperf/guzzle Version ^3.1
hyperf/resource Version ^3.1
hyperf/session Version ^3.1
hyperf/stringable Version ^3.1
hyperf/view-engine Version ^3.1
symfony/process Version ^6.4 | ^7.0