Kinetic is a package that adds a view-composer-like feature to the Inertia.js Laravel adapter. This should be very intuitive if you are already familiar with how view and composers work in Laravel. You can use Inertia::composer() in any service provider to register composers for specific components. The first argument accepts either a string or an array of Inertia components, and the second argument accepts either a class string or a closure.
Then you can call the with() method from the factory class to set the composed props like so: Inertia::composer('User/Profile', function (ResponseFactory $inertia) { $inertia->with([ 'post' => [ 'subject' => 'Hello World!', 'description' => 'This is a description.' ]]); }); Multiple composers