From e3d13e1b4c32e919c8034564a91bbd7b4c94b5f4 Mon Sep 17 00:00:00 2001 From: Jason McCreary Date: Wed, 11 Dec 2024 15:01:51 -0500 Subject: [PATCH] Backoff render change --- src/Models/Statements/RenderStatement.php | 7 +++++++ tests/fixtures/components/properties-statements.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Models/Statements/RenderStatement.php b/src/Models/Statements/RenderStatement.php index 9aa590b8..ca3300ae 100644 --- a/src/Models/Statements/RenderStatement.php +++ b/src/Models/Statements/RenderStatement.php @@ -33,4 +33,11 @@ public function output(): string return $code; } + + private function buildParameters(): string + { + $parameters = array_map(fn ($parameter) => "'" . $parameter . "'", $this->data()); + + return implode(', ', $parameters); + } } diff --git a/tests/fixtures/components/properties-statements.php b/tests/fixtures/components/properties-statements.php index 202ca62c..71c48b3a 100644 --- a/tests/fixtures/components/properties-statements.php +++ b/tests/fixtures/components/properties-statements.php @@ -38,7 +38,7 @@ public function update() return redirect()->route('user.show', [$this->user]); - return view('user.show', compact($this->user, $extra)); + return view('user.show', compact('user', 'extra')); return new UserResource($this->user);