Skip to content

Commit 3bf2443

Browse files
committed
Renamed toInertiaProps to toInertiaProperties
1 parent f7e1526 commit 3bf2443

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/ProvidesInertiaProperties.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
interface ProvidesInertiaProperties
66
{
7-
public function toInertiaProps(RenderContext $context): iterable;
7+
public function toInertiaProperties(RenderContext $context): iterable;
88
}

src/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function resolveInertiaPropsProviders(array $props, Request $request): ar
165165
// Pipe into a Collection to leverage Collection::getArrayableItems()
166166
$newProps = array_merge(
167167
$newProps,
168-
collect($value->toInertiaProps($renderContext))->all()
168+
collect($value->toInertiaProperties($renderContext))->all()
169169
);
170170
} else {
171171
$newProps[$key] = $value;

tests/ResponseFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public function test_will_accept_instances_of_provides_inertia_props()
385385
Route::middleware([StartSession::class, ExampleMiddleware::class])->get('/', function () {
386386
return Inertia::render('User/Edit', new class implements ProvidesInertiaProperties
387387
{
388-
public function toInertiaProps(RenderContext $context): iterable
388+
public function toInertiaProperties(RenderContext $context): iterable
389389
{
390390
return [
391391
'foo' => 'bar',

tests/ResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ public function test_inertia_responsable_objects(): void
832832
'foo' => 'bar',
833833
new class implements ProvidesInertiaProperties
834834
{
835-
public function toInertiaProps(RenderContext $context): iterable
835+
public function toInertiaProperties(RenderContext $context): iterable
836836
{
837837
return collect([
838838
'baz' => 'qux',
@@ -937,7 +937,7 @@ public function test_props_can_be_added_using_the_with_method(): void
937937
->with(['quux' => 'corge'])
938938
->with(new class implements ProvidesInertiaProperties
939939
{
940-
public function toInertiaProps(RenderContext $context): iterable
940+
public function toInertiaProperties(RenderContext $context): iterable
941941
{
942942
return collect(['grault' => 'garply']);
943943
}

0 commit comments

Comments
 (0)