Skip to content

Commit 3d6237b

Browse files
authored
Merge pull request #68 from rodrigore/master
Remove array_only in favour of facade array helper
2 parents f82586a + ddc595a commit 3d6237b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Response.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Inertia;
44

55
use Closure;
6+
use Illuminate\Support\Arr;
67
use Illuminate\Http\JsonResponse;
78
use Illuminate\Support\Facades\App;
89
use Illuminate\Support\Facades\View;
@@ -52,7 +53,7 @@ public function toResponse($request)
5253
$only = array_filter(explode(',', $request->header('X-Inertia-Partial-Data')));
5354

5455
$props = ($only && $request->header('X-Inertia-Partial-Component') === $this->component)
55-
? array_only($this->props, $only)
56+
? Arr::only($this->props, $only)
5657
: $this->props;
5758

5859
array_walk_recursive($props, function (&$prop) {

0 commit comments

Comments
 (0)