diff --git a/src/Response.php b/src/Response.php index d2565294..988cdbc8 100644 --- a/src/Response.php +++ b/src/Response.php @@ -95,6 +95,8 @@ public function toResponse($request) 'props' => $props, 'url' => Str::start(Str::after($request->fullUrl(), $request->getSchemeAndHttpHost()), '/'), 'version' => $this->version, + 'encryptHistory' => false, + 'clearHistory' => false, ]; if ($request->header(Header::INERTIA)) { diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index 5e90f3e1..42f60a43 100644 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -28,6 +28,8 @@ public function test_controller_returns_an_inertia_response(): void ], 'url' => '/', 'version' => '', + 'encryptHistory' => false, + 'clearHistory' => false, ]); } } diff --git a/tests/ResponseTest.php b/tests/ResponseTest.php index ef692c02..4676d358 100644 --- a/tests/ResponseTest.php +++ b/tests/ResponseTest.php @@ -46,7 +46,7 @@ public function test_server_response(): void $this->assertSame('Jonathan', $page['props']['user']['name']); $this->assertSame('/user/123', $page['url']); $this->assertSame('123', $page['version']); - $this->assertSame('
', $view->render()); + $this->assertSame('
', $view->render()); } public function test_xhr_response(): void @@ -98,8 +98,7 @@ public function test_lazy_resource_response(): void $callable = static function () use ($users) { $page = new LengthAwarePaginator($users->take(2), $users->count(), 2); - return new class($page, JsonResource::class) extends ResourceCollection { - }; + return new class($page, JsonResource::class) extends ResourceCollection {}; }; $response = new Response('User/Index', ['users' => $callable], 'app', '123');