Skip to content

Inertia Sharing and Versioning #326

@devingray

Description

@devingray

Hi @taylorotwell and the Laravel Team.

I am wondering if a PR to allow Inertia versioning and sharing to be published would be something that the package would be interested in.

Some context:

Versioning:
Currently because Jetstream does not version the Inertia Bundle it needs a cleared cache reload before seeing changes on the front end.

This can be easily achieved in the register method of AppServiceProvider.php but I personally like to create an InertiaServiceProvider to keep everything in their neat little rows.

An example code would be something like

            Inertia::version(function () {
                return md5_file(public_path('mix-manifest.json'));
            });

Sharing

I noticed that sharing is provided at a middleware level but is not published, this houses some data such as has_two_factor enabled, I guess it could be overwritten if I were to create my own but this just adds steps to the request cycle.

My idea is to create an InertiaServiceProvider with some default boilerplate to get this going.

Feel free to close if this is not the direction of the package

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions