Download the PHP package conquest/relay without Composer
On this page you can find all versions of the php package conquest/relay. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download conquest/relay
More information about conquest/relay
Files in conquest/relay
Package relay
Short Description Share localized, backend-driven messages as text to your Inertia frontend.
License MIT
Homepage https://github.com/conquest/relay
Informations about the package relay
Share localized, backend-driven messages as text to your Inertia frontend.
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
This is the contents of the published config file:
Usage
Inside a controller, you can append translations to your application using the relay()
helper.
By default, this will share all translations from the lang
or the path
set in the config directory to the frontend. You can customize this behavior by publishing the config file and modifying the excludes
array. This array is cahced for each available language defined in the config('relay.languages')
array. You can select to only pass a subset of translations to the frontend by adding keys using dot notations to reduce the amount of data sent over the wire. This accepts wildcard characters as well.
Ensure that the RelaysTranslations
middleware is applied to any Inertia based routes. You can extend this middleware to overwrite the HandlesInertiaRequests
middleware in the Laravel starter packages, as this package itself extends the Inertia middleware.
Testing
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of relay with dependencies
illuminate/contracts Version ^10.0||^11.0
spatie/laravel-package-tools Version ^1.16
inertiajs/inertia-laravel Version ^1.0