inertia-laravel icon indicating copy to clipboard operation
inertia-laravel copied to clipboard

[2.x] Ensure closures are resolved via App in resolveArrayableProperties

Open jaspertey opened this issue 4 months ago • 2 comments

This PR resolves a regression in 2.x where shared data closures with arguments could not be resolved. This patch ensures that the closures are resolved using App::call().

e.g.,

Inertia::share('query', fn (Request $request) => $request->query());

I encountered this while trying to upgrade a project to Inertia 2.x. A supporting test has been created to demonstrate further.

jaspertey avatar Oct 24 '24 17:10 jaspertey