Skip to content

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