Skip to content

Conversation

@marcorieser
Copy link
Contributor

@marcorieser marcorieser commented Jan 16, 2026

We (Jack Sleight and I) are currently adding support for hydrating the Cascade between subsequent requests in Livewire. Right now, the logic to hydrate the content runs for all subsequent requests, even if the Cascade does not get hydrated in the request:

https://github.com/jacksleight/statamic-livewire/blob/5e598375c06ecfd5bf40b6bad3e8878feb7f3f51/src/Http/Middleware/HydrateCascadeByLivewireUrl.php#L42

So I thought, adding support for a closure could prevent that.

I wonder if Cascade::content() should return the property as is or evaluate the potential closure.

@marcorieser marcorieser changed the title Allow closure in cascade content hydration [5.x] Allow closure in cascade content hydration Jan 16, 2026
@marcorieser marcorieser marked this pull request as ready for review January 16, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant