Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.4] Let PHP parse @renderWhen #18285

Merged
merged 1 commit into from
Mar 13, 2017
Merged

[5.4] Let PHP parse @renderWhen #18285

merged 1 commit into from
Mar 13, 2017

Conversation

themsaid
Copy link
Member

@themsaid themsaid commented Mar 9, 2017

In this PR we'll just let the directive call a renderWhen method in the view factory that'll handle checking the condition and render the view if it's true.

@deleugpn
Copy link
Contributor

deleugpn commented Mar 19, 2017

Is it possible to get this PR? I'm on 5.4.15, but it seems like this will need to be added on a new release version before being able to get it from composer update. I found a bug with the original implementation and this PR fixes the bug.

On a clean install of Laravel 5.4.15, if you use includeWhen(condition(), 'view', ['parameters' => 'value']), it fails because the original regex will group the condition() together with the view and try to make a view out of the parameters as shown here.

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.

3 participants