inertia-laravel
inertia-laravel copied to clipboard
Allow Inertia\Response rebinding in user-land
For some specific use case, I would be able to override the Inertia\Response
class to add some project-specific helpers, that can't be achievable with Inertia::shared()
.
Switching from new Response
to app()->make(Response::class)
in ResponseFactory would let us (as project user) rebind the Response class in a Service provider :
$this->app->bind(\Inertia\Response::class, CustomInertiaResponse::class);
This PR doesn't introduce breaking changes.