Skip to content

[10.x] allow resolving view from closure#48719

Merged
taylorotwell merged 2 commits intolaravel:10.xfrom
ph7jack:10.x-blade-view-support
Oct 13, 2023
Merged

[10.x] allow resolving view from closure#48719
taylorotwell merged 2 commits intolaravel:10.xfrom
ph7jack:10.x-blade-view-support

Conversation

@ph7jack
Copy link
Contributor

@ph7jack ph7jack commented Oct 12, 2023

Hi, this PR purpose is to add support to blade view when using closure to access the component $data and attributes.
It's really useful for building components

Before
image

After
image

Passing the view instance directly will prevent double-view rendering issues.

Thanks

PS: I've added a test to cover the current feature using string, however, I was not able to add a unit test for the view instance.

@ph7jack ph7jack changed the title allow resolving view from closure [10.x] allow resolving view from closure Oct 12, 2023
@taylorotwell taylorotwell merged commit 7817052 into laravel:10.x Oct 13, 2023
@ph7jack
Copy link
Contributor Author

ph7jack commented Oct 13, 2023

@taylorotwell is it possible to have the feature in the laravel 9 too?

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.

2 participants