We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
array_merge
HandleInertiaRequests
1 parent bfe0c95 commit 21f3f26Copy full SHA for 21f3f26
stubs/inertia/app/Http/Middleware/HandleInertiaRequests.php
@@ -30,12 +30,12 @@ public function version(Request $request): ?string
30
*/
31
public function share(Request $request): array
32
{
33
- return array_merge(parent::share($request), [
34
- 'ziggy' => function () use ($request) {
35
- return array_merge((new Ziggy)->toArray(), [
36
- 'location' => $request->url(),
37
- ]);
38
- },
39
+ return [
+ ...parent::share($request),
+ 'ziggy' => fn () => [
+ ...(new Ziggy)->toArray(),
+ 'location' => $request->url(),
+ ],
+ ];
40
}
41
0 commit comments